From 1aef62bea209597c31e5b5069c6fa100ae62e970 Mon Sep 17 00:00:00 2001 From: Jon Atkins Date: Fri, 14 Jun 2013 20:30:05 +0100 Subject: [PATCH] apply the new plugin wrapper change to the mobile-only user-location plugin --- mobile/user-location.user.js | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/mobile/user-location.user.js b/mobile/user-location.user.js index ce2f0631..0536412c 100644 --- a/mobile/user-location.user.js +++ b/mobile/user-location.user.js @@ -12,10 +12,7 @@ // @match http://www.ingress.com/intel* // ==/UserScript== -function wrapper() { -// ensure plugin framework is there, even if iitc is not yet loaded -if(typeof window.plugin !== 'function') window.plugin = function() {}; - +@@PLUGINSTART@@ // PLUGIN START //////////////////////////////////////////////////////// @@ -53,16 +50,4 @@ var setup = window.plugin.userLocation.setup; // PLUGIN END ////////////////////////////////////////////////////////// -if(window.iitcLoaded && typeof setup === 'function') { - setup(); -} else { - if(window.bootPlugins) - window.bootPlugins.push(setup); - else - window.bootPlugins = [setup]; -} -} // wrapper end -// inject code into site context -var script = document.createElement('script'); -script.appendChild(document.createTextNode('('+ wrapper +')();')); -(document.body || document.head || document.documentElement).appendChild(script); +@@PLUGINEND@@