Repair the dwb workaround (also applicable to Scriptish). #855
This commit is contained in:
parent
291da8ae36
commit
bff455b5a9
@ -1,10 +1,15 @@
|
|||||||
var Conf, E, c, d, doc, g;
|
var Conf, E, c, d, doc, docSet, g;
|
||||||
|
|
||||||
Conf = {};
|
Conf = {};
|
||||||
c = console;
|
c = console;
|
||||||
d = document;
|
d = document;
|
||||||
doc = d.documentElement;
|
doc = d.documentElement;
|
||||||
|
|
||||||
|
// Workaround for userscript managers that run script before document.documentElement is set
|
||||||
|
docSet = function() {
|
||||||
|
return (doc = d.documentElement);
|
||||||
|
};
|
||||||
|
|
||||||
g = {
|
g = {
|
||||||
VERSION: '<%= readJSON('/version.json').version %>',
|
VERSION: '<%= readJSON('/version.json').version %>',
|
||||||
NAMESPACE: '<%= meta.name %>.',
|
NAMESPACE: '<%= meta.name %>.',
|
||||||
|
|||||||
@ -65,7 +65,7 @@ Main =
|
|||||||
items[key] = undefined for key of Conf
|
items[key] = undefined for key of Conf
|
||||||
items['previousversion'] = undefined
|
items['previousversion'] = undefined
|
||||||
$.get items, (items) ->
|
$.get items, (items) ->
|
||||||
$.asap (-> doc = d.documentElement), ->
|
$.asap docSet, ->
|
||||||
|
|
||||||
# Don't hide the local storage warning behind a settings panel.
|
# Don't hide the local storage warning behind a settings panel.
|
||||||
if $.cantSet
|
if $.cantSet
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user