Greasemonkey: fix scoping function decleration.
Apparently making a function like `function foo() {};` in block scope is illegal. It should be named via assignment. Switched to an IIFE anyway because it doesn't need a name.
This commit is contained in:
parent
c7a9792b67
commit
19242b6cb2
@ -197,12 +197,11 @@
|
||||
// with `with` scope because then it would get assigned to the
|
||||
// proxy and we would get the same problem, so we have to make yet
|
||||
// another nested scope.
|
||||
function qute_gm_window_scope() { // why can't this be anonymous?
|
||||
(function() {
|
||||
let window = qute_gm_window_proxy;
|
||||
// ====== The actual user script source ====== //
|
||||
{{ scriptSource }}
|
||||
// ====== End User Script ====== //
|
||||
};
|
||||
qute_gm_window_scope();
|
||||
})();
|
||||
};
|
||||
})();
|
||||
|
Loading…
Reference in New Issue
Block a user