canvas render plugin: add setting to window object outside of wrapper - this makes it work on mobile despite order potentially being wrong
note: also unsafeWindow version attempted, for tampermonkey/greasemonkey - but this doesn't work for some reason
This commit is contained in:
parent
fb7eae8473
commit
f47b1211d2
@ -11,15 +11,21 @@
|
||||
// @include http://www.ingress.com/intel*
|
||||
// @match https://www.ingress.com/intel*
|
||||
// @match http://www.ingress.com/intel*
|
||||
// @grant none
|
||||
// @grant unsafeWindow
|
||||
// ==/UserScript==
|
||||
|
||||
// NON-STANDARD plugin - try and set the variable early, as
|
||||
// we need this global variable set before leaflet initialises
|
||||
window.L_PREFER_CANVAS = true;
|
||||
if (typeof unsafeWindow !== 'undefined') unsafeWindow.L_PREFER_CANVAS = true; //doesn't actually work... :/
|
||||
|
||||
|
||||
@@PLUGINSTART@@
|
||||
|
||||
// PLUGIN START ////////////////////////////////////////////////////////
|
||||
|
||||
// we need this global variable set before leaflet initialises
|
||||
L_PREFER_CANVAS = true;
|
||||
window.L_PREFER_CANVAS = true;
|
||||
|
||||
// use own namespace for plugin
|
||||
window.plugin.canvasRendering = function() {};
|
||||
|
Loading…
x
Reference in New Issue
Block a user