From fa22a6984b481264cad7085944cae8212775f721 Mon Sep 17 00:00:00 2001 From: Xelio Date: Mon, 20 May 2013 00:51:32 +0800 Subject: [PATCH 1/6] Plugin Sync: Change folder name to avoid conflict of old clientId --- plugins/sync.user.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/sync.user.js b/plugins/sync.user.js index 04eecdcf..f5d38a01 100644 --- a/plugins/sync.user.js +++ b/plugins/sync.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @id iitc-plugin-sync@xelio // @name IITC plugin: Sync -// @version 0.2.0.@@DATETIMEVERSION@@ +// @version 0.2.1.@@DATETIMEVERSION@@ // @namespace https://github.com/jonatkins/ingress-intel-total-conversion // @updateURL @@UPDATEURL@@ // @downloadURL @@DOWNLOADURL@@ @@ -383,7 +383,7 @@ window.plugin.sync.FileSearcher.prototype.instances = {}; window.plugin.sync.FileSearcher.prototype.RETRY_LIMIT = 2; window.plugin.sync.FileSearcher.prototype.MIMETYPE_FILE = 'application/vnd.google-apps.drive-sdk'; window.plugin.sync.FileSearcher.prototype.MIMETYPE_FOLDER = 'application/vnd.google-apps.folder'; -window.plugin.sync.FileSearcher.prototype.parentName = 'IITC-SYNC-DATA'; +window.plugin.sync.FileSearcher.prototype.parentName = 'IITC-SYNC-DATA-V2'; window.plugin.sync.FileSearcher.prototype.parentDescription = 'Store IITC sync data'; window.plugin.sync.FileSearcher.prototype.initialize = function(force) { From 84cb73d8e18078c11b6a8fc95a3b9df950f1fd66 Mon Sep 17 00:00:00 2001 From: Jon Atkins Date: Mon, 20 May 2013 03:12:19 +0100 Subject: [PATCH 2/6] add @grant none to userscript headers - as recommended by greasemonkey --- main.js | 1 + plugins/ap-list.user.js | 1 + plugins/compute-ap-stats.user.js | 1 + plugins/draw-tools.user.js | 1 + plugins/force-https.user.js | 1 + plugins/guess-player-levels.user.js | 1 + plugins/ipas-link.user.js | 1 + plugins/keys-on-map.user.js | 1 + plugins/keys.user.js | 1 + plugins/max-links.user.js | 1 + plugins/pan-control.user.js | 1 + plugins/player-tracker.user.js | 1 + plugins/players-resonators.user.js | 1 + plugins/portal-counts.user.js | 1 + plugins/portal-highlighter-can-make-level.user.js | 1 + plugins/portal-highlighter-level-color.user.js | 1 + plugins/portal-highlighter-missing-resonators.user.js | 1 + plugins/portal-highlighter-my-portals.user.js | 1 + plugins/portal-highlighter-portal-ap-energy-relative.user.js | 1 + plugins/portal-highlighter-portal-ap-relative.user.js | 1 + plugins/portal-highlighter-portal-ap.user.js | 1 + plugins/portal-highlighter-portals-my-level.user.js | 1 + plugins/portal-highlighter-portals-upgrade.user.js | 1 + plugins/portal-level-numbers.user.js | 1 + plugins/portals-list.user.js | 1 + plugins/privacy-view.user.js | 1 + plugins/render-limit-increase.user.js | 1 + plugins/reso-energy-pct-in-portal-detail.user.js | 1 + plugins/resonator-display-zoom-level-decrease.user.js | 1 + plugins/scale-bar.user.js | 1 + plugins/scoreboard.user.js | 1 + plugins/show-address.user.js | 1 + plugins/show-linked-portals.user.js | 1 + plugins/show-portal-weakness.user.js | 1 + plugins/speech-search.user.js | 1 + plugins/sync.user.js | 1 + plugins/zoom-slider.user.js | 1 + 37 files changed, 37 insertions(+) diff --git a/main.js b/main.js index bc28889e..1416fe94 100644 --- a/main.js +++ b/main.js @@ -10,6 +10,7 @@ // @include https://www.ingress.com/intel* // @match http://www.ingress.com/intel* // @match https://www.ingress.com/intel* +// @grant none // ==/UserScript== diff --git a/plugins/ap-list.user.js b/plugins/ap-list.user.js index 9bf1c09a..5bba760e 100644 --- a/plugins/ap-list.user.js +++ b/plugins/ap-list.user.js @@ -10,6 +10,7 @@ // @include http://www.ingress.com/intel* // @match https://www.ingress.com/intel* // @match http://www.ingress.com/intel* +// @grant none // ==/UserScript== function wrapper() { diff --git a/plugins/compute-ap-stats.user.js b/plugins/compute-ap-stats.user.js index e6c360e7..fc3d7177 100644 --- a/plugins/compute-ap-stats.user.js +++ b/plugins/compute-ap-stats.user.js @@ -10,6 +10,7 @@ // @include http://www.ingress.com/intel* // @match https://www.ingress.com/intel* // @match http://www.ingress.com/intel* +// @grant none // ==/UserScript== function wrapper() { diff --git a/plugins/draw-tools.user.js b/plugins/draw-tools.user.js index c5d38c7d..91f9d25d 100644 --- a/plugins/draw-tools.user.js +++ b/plugins/draw-tools.user.js @@ -10,6 +10,7 @@ // @include http://www.ingress.com/intel* // @match https://www.ingress.com/intel* // @match http://www.ingress.com/intel* +// @grant none // ==/UserScript== function wrapper() { diff --git a/plugins/force-https.user.js b/plugins/force-https.user.js index 4770aebe..a8925451 100644 --- a/plugins/force-https.user.js +++ b/plugins/force-https.user.js @@ -10,6 +10,7 @@ // @include http://www.ingress.com/intel* // @match https://www.ingress.com/intel* // @match http://www.ingress.com/intel* +// @grant none // ==/UserScript== diff --git a/plugins/guess-player-levels.user.js b/plugins/guess-player-levels.user.js index e90d936b..0e94cc5f 100644 --- a/plugins/guess-player-levels.user.js +++ b/plugins/guess-player-levels.user.js @@ -10,6 +10,7 @@ // @include http://www.ingress.com/intel* // @match https://www.ingress.com/intel* // @match http://www.ingress.com/intel* +// @grant none // ==/UserScript== function wrapper() { diff --git a/plugins/ipas-link.user.js b/plugins/ipas-link.user.js index ac158c10..682f3083 100644 --- a/plugins/ipas-link.user.js +++ b/plugins/ipas-link.user.js @@ -10,6 +10,7 @@ // @include http://www.ingress.com/intel* // @match https://www.ingress.com/intel* // @match http://www.ingress.com/intel* +// @grant none // ==/UserScript== diff --git a/plugins/keys-on-map.user.js b/plugins/keys-on-map.user.js index 6b1bc160..243ac2e9 100644 --- a/plugins/keys-on-map.user.js +++ b/plugins/keys-on-map.user.js @@ -10,6 +10,7 @@ // @include http://www.ingress.com/intel* // @match https://www.ingress.com/intel* // @match http://www.ingress.com/intel* +// @grant none // ==/UserScript== function wrapper() { diff --git a/plugins/keys.user.js b/plugins/keys.user.js index f0b15e63..3679eca5 100644 --- a/plugins/keys.user.js +++ b/plugins/keys.user.js @@ -10,6 +10,7 @@ // @include http://www.ingress.com/intel* // @match https://www.ingress.com/intel* // @match http://www.ingress.com/intel* +// @grant none // ==/UserScript== function wrapper() { diff --git a/plugins/max-links.user.js b/plugins/max-links.user.js index 8571b1b1..9aed5f10 100644 --- a/plugins/max-links.user.js +++ b/plugins/max-links.user.js @@ -9,6 +9,7 @@ // @include http://www.ingress.com/intel* // @match https://www.ingress.com/intel* // @match http://www.ingress.com/intel* +// @grant none // ==/UserScript== function wrapper() { diff --git a/plugins/pan-control.user.js b/plugins/pan-control.user.js index 723d2875..9e8f320d 100644 --- a/plugins/pan-control.user.js +++ b/plugins/pan-control.user.js @@ -10,6 +10,7 @@ // @include http://www.ingress.com/intel* // @match https://www.ingress.com/intel* // @match http://www.ingress.com/intel* +// @grant none // ==/UserScript== function wrapper() { diff --git a/plugins/player-tracker.user.js b/plugins/player-tracker.user.js index 3c04b65b..3b2013f3 100644 --- a/plugins/player-tracker.user.js +++ b/plugins/player-tracker.user.js @@ -10,6 +10,7 @@ // @include http://www.ingress.com/intel* // @match https://www.ingress.com/intel* // @match http://www.ingress.com/intel* +// @grant none // ==/UserScript== function wrapper() { diff --git a/plugins/players-resonators.user.js b/plugins/players-resonators.user.js index dbe5b5d8..0b76bf12 100644 --- a/plugins/players-resonators.user.js +++ b/plugins/players-resonators.user.js @@ -10,6 +10,7 @@ // @include http://www.ingress.com/intel* // @match https://www.ingress.com/intel* // @match http://www.ingress.com/intel* +// @grant none // ==/UserScript== /********************************************************************************************************* diff --git a/plugins/portal-counts.user.js b/plugins/portal-counts.user.js index b0b699bd..4ef7b6d3 100644 --- a/plugins/portal-counts.user.js +++ b/plugins/portal-counts.user.js @@ -10,6 +10,7 @@ // @include http://www.ingress.com/intel* // @match https://www.ingress.com/intel* // @match http://www.ingress.com/intel* +// @grant none // ==/UserScript== /* whatsnew diff --git a/plugins/portal-highlighter-can-make-level.user.js b/plugins/portal-highlighter-can-make-level.user.js index 301d0b7e..7a19044d 100644 --- a/plugins/portal-highlighter-can-make-level.user.js +++ b/plugins/portal-highlighter-can-make-level.user.js @@ -10,6 +10,7 @@ // @include http://www.ingress.com/intel* // @match https://www.ingress.com/intel* // @match http://www.ingress.com/intel* +// @grant none // ==/UserScript== function wrapper() { diff --git a/plugins/portal-highlighter-level-color.user.js b/plugins/portal-highlighter-level-color.user.js index ac6344ff..a690d838 100644 --- a/plugins/portal-highlighter-level-color.user.js +++ b/plugins/portal-highlighter-level-color.user.js @@ -10,6 +10,7 @@ // @include http://www.ingress.com/intel* // @match https://www.ingress.com/intel* // @match http://www.ingress.com/intel* +// @grant none // ==/UserScript== function wrapper() { diff --git a/plugins/portal-highlighter-missing-resonators.user.js b/plugins/portal-highlighter-missing-resonators.user.js index d93b2795..1103bf85 100644 --- a/plugins/portal-highlighter-missing-resonators.user.js +++ b/plugins/portal-highlighter-missing-resonators.user.js @@ -10,6 +10,7 @@ // @include http://www.ingress.com/intel* // @match https://www.ingress.com/intel* // @match http://www.ingress.com/intel* +// @grant none // ==/UserScript== function wrapper() { diff --git a/plugins/portal-highlighter-my-portals.user.js b/plugins/portal-highlighter-my-portals.user.js index 77ed233f..505c9e4c 100644 --- a/plugins/portal-highlighter-my-portals.user.js +++ b/plugins/portal-highlighter-my-portals.user.js @@ -10,6 +10,7 @@ // @include http://www.ingress.com/intel* // @match https://www.ingress.com/intel* // @match http://www.ingress.com/intel* +// @grant none // ==/UserScript== function wrapper() { diff --git a/plugins/portal-highlighter-portal-ap-energy-relative.user.js b/plugins/portal-highlighter-portal-ap-energy-relative.user.js index 677c2ab5..02ba2a8a 100644 --- a/plugins/portal-highlighter-portal-ap-energy-relative.user.js +++ b/plugins/portal-highlighter-portal-ap-energy-relative.user.js @@ -10,6 +10,7 @@ // @include http://www.ingress.com/intel* // @match https://www.ingress.com/intel* // @match http://www.ingress.com/intel* +// @grant none // ==/UserScript== function wrapper() { diff --git a/plugins/portal-highlighter-portal-ap-relative.user.js b/plugins/portal-highlighter-portal-ap-relative.user.js index a96941bb..5bade6b6 100644 --- a/plugins/portal-highlighter-portal-ap-relative.user.js +++ b/plugins/portal-highlighter-portal-ap-relative.user.js @@ -10,6 +10,7 @@ // @include http://www.ingress.com/intel* // @match https://www.ingress.com/intel* // @match http://www.ingress.com/intel* +// @grant none // ==/UserScript== function wrapper() { diff --git a/plugins/portal-highlighter-portal-ap.user.js b/plugins/portal-highlighter-portal-ap.user.js index 30ced897..0441fdc6 100644 --- a/plugins/portal-highlighter-portal-ap.user.js +++ b/plugins/portal-highlighter-portal-ap.user.js @@ -10,6 +10,7 @@ // @include http://www.ingress.com/intel* // @match https://www.ingress.com/intel* // @match http://www.ingress.com/intel* +// @grant none // ==/UserScript== function wrapper() { diff --git a/plugins/portal-highlighter-portals-my-level.user.js b/plugins/portal-highlighter-portals-my-level.user.js index 654eea68..32d1fa47 100644 --- a/plugins/portal-highlighter-portals-my-level.user.js +++ b/plugins/portal-highlighter-portals-my-level.user.js @@ -10,6 +10,7 @@ // @include http://www.ingress.com/intel* // @match https://www.ingress.com/intel* // @match http://www.ingress.com/intel* +// @grant none // ==/UserScript== function wrapper() { diff --git a/plugins/portal-highlighter-portals-upgrade.user.js b/plugins/portal-highlighter-portals-upgrade.user.js index 976d413a..e8238e6f 100644 --- a/plugins/portal-highlighter-portals-upgrade.user.js +++ b/plugins/portal-highlighter-portals-upgrade.user.js @@ -10,6 +10,7 @@ // @include http://www.ingress.com/intel* // @match https://www.ingress.com/intel* // @match http://www.ingress.com/intel* +// @grant none // ==/UserScript== function wrapper() { diff --git a/plugins/portal-level-numbers.user.js b/plugins/portal-level-numbers.user.js index 43535562..349c1fd0 100644 --- a/plugins/portal-level-numbers.user.js +++ b/plugins/portal-level-numbers.user.js @@ -10,6 +10,7 @@ // @include http://www.ingress.com/intel* // @match https://www.ingress.com/intel* // @match http://www.ingress.com/intel* +// @grant none // ==/UserScript== function wrapper() { diff --git a/plugins/portals-list.user.js b/plugins/portals-list.user.js index fdb94300..5fe38471 100644 --- a/plugins/portals-list.user.js +++ b/plugins/portals-list.user.js @@ -10,6 +10,7 @@ // @include http://www.ingress.com/intel* // @match https://www.ingress.com/intel* // @match http://www.ingress.com/intel* +// @grant none // ==/UserScript== /* whatsnew diff --git a/plugins/privacy-view.user.js b/plugins/privacy-view.user.js index a04e358d..8a400335 100644 --- a/plugins/privacy-view.user.js +++ b/plugins/privacy-view.user.js @@ -10,6 +10,7 @@ // @include http://www.ingress.com/intel* // @match https://www.ingress.com/intel* // @match http://www.ingress.com/intel* +// @grant none // ==/UserScript== function wrapper() { diff --git a/plugins/render-limit-increase.user.js b/plugins/render-limit-increase.user.js index 6c002d2f..d3b43039 100644 --- a/plugins/render-limit-increase.user.js +++ b/plugins/render-limit-increase.user.js @@ -10,6 +10,7 @@ // @include http://www.ingress.com/intel* // @match https://www.ingress.com/intel* // @match http://www.ingress.com/intel* +// @grant none // ==/UserScript== function wrapper() { diff --git a/plugins/reso-energy-pct-in-portal-detail.user.js b/plugins/reso-energy-pct-in-portal-detail.user.js index d95800e1..226d5ced 100644 --- a/plugins/reso-energy-pct-in-portal-detail.user.js +++ b/plugins/reso-energy-pct-in-portal-detail.user.js @@ -10,6 +10,7 @@ // @include http://www.ingress.com/intel* // @match https://www.ingress.com/intel* // @match http://www.ingress.com/intel* +// @grant none // ==/UserScript== function wrapper() { diff --git a/plugins/resonator-display-zoom-level-decrease.user.js b/plugins/resonator-display-zoom-level-decrease.user.js index aee8556a..d1fb272f 100644 --- a/plugins/resonator-display-zoom-level-decrease.user.js +++ b/plugins/resonator-display-zoom-level-decrease.user.js @@ -10,6 +10,7 @@ // @include http://www.ingress.com/intel* // @match https://www.ingress.com/intel* // @match http://www.ingress.com/intel* +// @grant none // ==/UserScript== function wrapper() { diff --git a/plugins/scale-bar.user.js b/plugins/scale-bar.user.js index 9e5b5efc..0a451357 100644 --- a/plugins/scale-bar.user.js +++ b/plugins/scale-bar.user.js @@ -10,6 +10,7 @@ // @include http://www.ingress.com/intel* // @match https://www.ingress.com/intel* // @match http://www.ingress.com/intel* +// @grant none // ==/UserScript== function wrapper() { diff --git a/plugins/scoreboard.user.js b/plugins/scoreboard.user.js index 8b5270bc..ddd8de61 100644 --- a/plugins/scoreboard.user.js +++ b/plugins/scoreboard.user.js @@ -10,6 +10,7 @@ // @include http://www.ingress.com/intel* // @match https://www.ingress.com/intel* // @match http://www.ingress.com/intel* +// @grant none // ==/UserScript== function wrapper() { diff --git a/plugins/show-address.user.js b/plugins/show-address.user.js index 800710b4..488159bd 100644 --- a/plugins/show-address.user.js +++ b/plugins/show-address.user.js @@ -10,6 +10,7 @@ // @include http://www.ingress.com/intel* // @match https://www.ingress.com/intel* // @match http://www.ingress.com/intel* +// @grant none // ==/UserScript== function wrapper() { diff --git a/plugins/show-linked-portals.user.js b/plugins/show-linked-portals.user.js index e380557c..54a0a7a1 100644 --- a/plugins/show-linked-portals.user.js +++ b/plugins/show-linked-portals.user.js @@ -10,6 +10,7 @@ // @include http://www.ingress.com/intel* // @match https://www.ingress.com/intel* // @match http://www.ingress.com/intel* +// @grant none // ==/UserScript== /* diff --git a/plugins/show-portal-weakness.user.js b/plugins/show-portal-weakness.user.js index 59021ba5..c2809e7f 100644 --- a/plugins/show-portal-weakness.user.js +++ b/plugins/show-portal-weakness.user.js @@ -10,6 +10,7 @@ // @include http://www.ingress.com/intel* // @match https://www.ingress.com/intel* // @match http://www.ingress.com/intel* +// @grant none // ==/UserScript== function wrapper() { diff --git a/plugins/speech-search.user.js b/plugins/speech-search.user.js index 3b90e8e5..408be363 100644 --- a/plugins/speech-search.user.js +++ b/plugins/speech-search.user.js @@ -10,6 +10,7 @@ // @include http://www.ingress.com/intel* // @match https://www.ingress.com/intel* // @match http://www.ingress.com/intel* +// @grant none // ==/UserScript== function wrapper() { diff --git a/plugins/sync.user.js b/plugins/sync.user.js index f5d38a01..950d3edb 100644 --- a/plugins/sync.user.js +++ b/plugins/sync.user.js @@ -10,6 +10,7 @@ // @include http://www.ingress.com/intel* // @match https://www.ingress.com/intel* // @match http://www.ingress.com/intel* +// @grant none // ==/UserScript== function wrapper() { diff --git a/plugins/zoom-slider.user.js b/plugins/zoom-slider.user.js index 78ae4462..01e4269e 100644 --- a/plugins/zoom-slider.user.js +++ b/plugins/zoom-slider.user.js @@ -10,6 +10,7 @@ // @include http://www.ingress.com/intel* // @match https://www.ingress.com/intel* // @match http://www.ingress.com/intel* +// @grant none // ==/UserScript== function wrapper() { From 8a2ca8076bd63dac715ca32ee7c8b9539a18c02d Mon Sep 17 00:00:00 2001 From: Jon Atkins Date: Mon, 20 May 2013 03:12:55 +0100 Subject: [PATCH 3/6] build script - remove leading zeros from timestamp part of version number - possibly helps with firefox+greasemonkey update checks? --- build.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.py b/build.py index 7bd5606b..5c2e3cb9 100755 --- a/build.py +++ b/build.py @@ -53,7 +53,7 @@ settings = buildSettings[buildName] utcTime = time.gmtime() buildDate = time.strftime('%Y-%m-%d-%H%M%S',utcTime) # userscripts have specific specifications for version numbers - the above date format doesn't match -dateTimeVersion = time.strftime('%Y%m%d.%H%M%S',utcTime) +dateTimeVersion = time.strftime('%Y%m%d.',utcTime) + time.strftime('%H%M%S',utcTime).lstrip('0') # extract required values from the settings entry resourceUrlBase = settings.get('resourceUrlBase') From 79aa71911c05756cbe264a01e5945fda6233c295 Mon Sep 17 00:00:00 2001 From: Jon Atkins Date: Mon, 20 May 2013 03:58:29 +0100 Subject: [PATCH 4/6] add two-column layer menu css to desktop version - was on mobile before in-app layer chooser added --- style.css | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/style.css b/style.css index 3d065b86..d41ae45a 100644 --- a/style.css +++ b/style.css @@ -101,6 +101,27 @@ a:hover { cursor: help; } + +/* base layer selection - first column */ +.leaflet-control-layers-base { + float: left; +} + +/* overlays layer selection - 2nd column */ +.leaflet-control-layers-overlays { + float: left; + margin-left: 8px; + border-left: 1px solid #DDDDDD; + padding-left: 8px; +} + +/* hide the usual seperator */ +.leaflet-control-layers-separator { + display: none; +} + + + .help { cursor: help; } From 52bce7fa31ef0a532ccc7e4a2633498afb0799ba Mon Sep 17 00:00:00 2001 From: Jon Atkins Date: Mon, 20 May 2013 05:16:22 +0100 Subject: [PATCH 5/6] remove debug console.log, fix comment --- code/smartphone.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/smartphone.js b/code/smartphone.js index da15ad63..20cf9300 100644 --- a/code/smartphone.js +++ b/code/smartphone.js @@ -136,7 +136,6 @@ window.runOnSmartphonesAfterBoot = function() { } } window.layerChooser.showLayer = function(id,show) { - window.console.log('yeay' + id + show); if (show === undefined) show = true; obj = this._layers[id]; if (!obj) return false; @@ -146,7 +145,7 @@ window.runOnSmartphonesAfterBoot = function() { //the layer to show is not currently active this._map.addLayer(obj.layer); - //if it's an overlay, remove any others + //if it's a base layer, remove any others if (!obj.overlay) { for(i in this._layers) { if (i != id) { @@ -161,6 +160,7 @@ window.runOnSmartphonesAfterBoot = function() { this._map.removeLayer(obj.layer); } } + //below logic based on code in L.Control.Layers _onInputClick if(!obj.overlay) { this._map.setZoom(this._map.getZoom()); From a525fb51442e1352bcad6cc13823be654d162652 Mon Sep 17 00:00:00 2001 From: Jon Atkins Date: Mon, 20 May 2013 05:17:11 +0100 Subject: [PATCH 6/6] use the baselayerchange event parameter instead of testing to see if a layer is added to the map --- code/boot.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/boot.js b/code/boot.js index fd4d56ae..6c4f64c9 100644 --- a/code/boot.js +++ b/code/boot.js @@ -259,10 +259,10 @@ window.setMapBaseLayer = function() { //event to track layer changes and store the name - map.on('baselayerchange', function() { + map.on('baselayerchange', function(info) { for(i in window.layerChooser._layers) { var obj = window.layerChooser._layers[i]; - if (!obj.overlay && map.hasLayer(obj.layer)) { + if (info.layer === obj.layer) { localStorage['iitc-base-map'] = obj.name; break; }