-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.js
44 lines (35 loc) · 914 Bytes
/
main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
'use strict';
(function(){
const LINE_MANIFEST =
'https://marketplace.firefox.com/app/' +
'8bcde521-3e5b-4e0c-879d-26eccfa0b607/manifest.webapp';
function fix() {
var layer = document.getElementById('_wrap_profile_layer');
if (!layer) {
window.setTimeout(fix, 500);
return;
}
layer.addEventListener('touchend', function(e) {
e.target.click();
});
}
function init() {
if (document.documentElement.dataset.lineFixer) {
return;
}
navigator.mozApps.getSelf().onsuccess = function(e) {
if (document.documentElement.dataset.lineFixer) {
return;
}
if (e.target.result.manifestURL === LINE_MANIFEST) {
fix();
}
document.documentElement.dataset.lineFixer = true;
};
}
if (document.documentElement) {
init();
} else {
window.addEventListener('DOMContentLoaded', init);
}
})();