fix: script load

This commit is contained in:
Xmader 2020-12-06 02:35:08 -05:00
parent bdbcdd62e9
commit f224edbc49
No known key found for this signature in database
GPG Key ID: A20B97FB9EB730E4
1 changed files with 2 additions and 2 deletions

View File

@ -22,9 +22,9 @@ if (_GM && _GM.registerMenuCommand && _GM.openInTab) {
new Promise(resolve => {
const id = '' + Math.random();
w[id] = resolve;
setTimeout(`(function a(){window['${id}'](new Image())})()//# sourceURL=${location.href}`)
setTimeout(`(function a(){window['${id}'](new Image());delete window['${id}'];})()//# sourceURL=${location.href}`)
}).then(d => {
d.style.display = 'none';
d.src = 'data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==';
d.once = false;
d.setAttribute('onload', `if(this.once)return;this.once=true;this.remove();const GM=window['${gmId}'];(` + function a () {
d.setAttribute('onload', `if(this.once)return;this.once=true;this.remove();const GM=window['${gmId}'];delete window['${gmId}'];(` + function a () {