Repair the dwb workaround (also applicable to Scriptish). #855

This commit is contained in:
ccd0 2016-04-24 21:08:03 -07:00
parent 291da8ae36
commit bff455b5a9
2 changed files with 7 additions and 2 deletions

View File

@ -1,10 +1,15 @@
var Conf, E, c, d, doc, g;
var Conf, E, c, d, doc, docSet, g;
Conf = {};
c = console;
d = document;
doc = d.documentElement;
// Workaround for userscript managers that run script before document.documentElement is set
docSet = function() {
return (doc = d.documentElement);
};
g = {
VERSION: '<%= readJSON('/version.json').version %>',
NAMESPACE: '<%= meta.name %>.',

View File

@ -65,7 +65,7 @@ Main =
items[key] = undefined for key of Conf
items['previousversion'] = undefined
$.get items, (items) ->
$.asap (-> doc = d.documentElement), ->
$.asap docSet, ->
# Don't hide the local storage warning behind a settings panel.
if $.cantSet