Skip to content

Commit e6bc83b

Browse files
author
Ernesto Castellotti
authored
Improved UI to make it clear that the browser is not supported (#346)
Some users do not understand that the browser does not support WebSerial because on the page https://hack-gpon.org/ont-huawei-ma5671a-ymodem/ pressing the button opens the flash window, with this PR the button is deactivated if the browser is not supported and the the strikethrough out character is applied to button text
1 parent 9c7ce30 commit e6bc83b

4 files changed

Lines changed: 7 additions & 5 deletions

File tree

_includes/root_lantiq.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ <h2>Root status</h2>
4646
document.getElementById('start-button').disabled = false;
4747
} else {
4848
document.getElementById('browser-error').style.display = 'block';
49+
document.getElementById('start-button').disabled = true;
50+
document.getElementById('start-button').innerHTML=document.getElementById('start-button').innerText.strike();
4951
}
5052
const acontroller = new AbortController();
5153
const cs = acontroller.signal;

_includes/ymodem_lantiq.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ <h2>Flash firmware</h2>
4444
document.getElementById('flash-start-button').disabled = false;
4545
} else {
4646
document.getElementById('flash-browser-error').style.display = 'block';
47+
document.getElementById('flash-start-button').disabled = true;
48+
document.getElementById('flash-start-button').innerHTML=document.getElementById('flash-start-button').innerText.strike()
4749
}
4850
const acontroller = new AbortController();
4951
const cs = acontroller.signal;
@@ -202,4 +204,4 @@ <h2>Flash firmware</h2>
202204
}
203205
});
204206
};
205-
</script>
207+
</script>

_ont/ont-fs-com-gpon-onu-stick-with-mac.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,8 @@ When you are ready with everything plugged in you need to press the button below
147147

148148
{: .text-center .fs-6 }
149149
<button id="start-button" class="btn btn-blue" data-jtd-toggle="modal" data-jtd-target="#root-modal" disabled>Start emergency unlock!</button>
150-
{% include root_lantiq.html modelName="FS GPON ONU Stick" unlockHuaweiShell=false %}
151-
152150
<div id="browser-error" style="display:none">{% include alert.html content="This browser is not compatible with the emergency unlock procedure. See the <a href='https://developer.mozilla.org/en-US/docs/Web/API/Web_Serial_API#browser_compatibility'>Browser compatibility</a>" alert="Note" icon="svg-warning" color="red" %}</div>
151+
{% include root_lantiq.html modelName="FS GPON ONU Stick" unlockHuaweiShell=false %}
153152
<noscript>
154153
{% include alert.html content="Your browser does not support JavaScript!" alert="Note" icon="svg-warning" color="red" %}
155154
</noscript>

_ont/ont-huawei-ma5671a-root-web.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,8 @@ Connect the TTL adapter to the computer, once done press the following button. A
2828

2929
{: .text-center .fs-6 }
3030
<button id="start-button" class="btn btn-blue" data-jtd-toggle="modal" data-jtd-target="#root-modal" disabled>Start root!</button>
31-
{% include root_lantiq.html modelName="Huawei MA5671A" unlockHuaweiShell=true %}
32-
3331
<div id="browser-error" style="display:none">{% include alert.html content="This browser is not compatible with the web-root procedure. See the <a href='https://developer.mozilla.org/en-US/docs/Web/API/Web_Serial_API#browser_compatibility'>Browser compatibility</a>" alert="Note" icon="svg-warning" color="red" %}</div>
32+
{% include root_lantiq.html modelName="Huawei MA5671A" unlockHuaweiShell=true %}
3433
<noscript>
3534
{% include alert.html content="Your browser does not support JavaScript!" alert="Note" icon="svg-warning" color="red" %}
3635
</noscript>

0 commit comments

Comments
 (0)