Skip to content

Commit

Permalink
New @@MetaInfo@@ tag for less confusing headers
Browse files Browse the repository at this point in the history
  • Loading branch information
modos189 committed Nov 28, 2018
1 parent 48e8306 commit 0f03130
Show file tree
Hide file tree
Showing 71 changed files with 82 additions and 833 deletions.
9 changes: 9 additions & 0 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,14 @@
"""


pluginMetaBlock = """// @updateURL @@UPDATEURL@@
// @downloadURL @@DOWNLOADURL@@
// @namespace https://github.com/IITC-CE/ingress-intel-total-conversion
// @include https://intel.ingress.com/*
// @match https://intel.ingress.com/*
// @grant none"""


def readfile(fn):
with io.open(fn, 'Ur', encoding='utf8') as f:
return f.read()
Expand Down Expand Up @@ -130,6 +138,7 @@ def extractUserScriptMeta(var):
def doReplacements(script, updateUrl, downloadUrl, pluginName=None):
script = re.sub('@@INJECTCODE@@', loadCode, script)

script = script.replace('@@METAINFO@@', pluginMetaBlock)
script = script.replace('@@PLUGINSTART@@', pluginWrapperStart)
script = script.replace('@@PLUGINSTART-USE-STRICT@@', pluginWrapperStartUseStrict)
script = script.replace('@@PLUGINEND@@', pluginWrapperEnd)
Expand Down
12 changes: 3 additions & 9 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,12 @@
// @id ingress-intel-total-conversion@jonatkins
// @name IITC: Ingress intel map total conversion
// @version 0.27.0.@@DATETIMEVERSION@@
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @namespace https://github.com/IITC-CE/ingress-intel-total-conversion
// @updateURL @@UPDATEURL@@
// @downloadURL @@DOWNLOADURL@@
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Total conversion for the ingress intel map.
// @include https://*.ingress.com/intel*
// @include http://*.ingress.com/intel*
// @match https://*.ingress.com/intel*
// @match http://*.ingress.com/intel*
// @include https://*.ingress.com/mission/*
// @include http://*.ingress.com/mission/*
// @match https://*.ingress.com/mission/*
// @match http://*.ingress.com/mission/*
// @include https://intel.ingress.com/*
// @match https://intel.ingress.com/*
// @grant none
// @run-at document-end
// ==/UserScript==
Expand Down
13 changes: 1 addition & 12 deletions plugins/add-kml.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,8 @@
// @name IITC plugin: overlay KML
// @category Layer
// @version 0.2.0.@@DATETIMEVERSION@@
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @updateURL @@UPDATEURL@@
// @downloadURL @@DOWNLOADURL@@
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Allow users to overlay their own KML / GPX files on top of IITC.
// @include https://*.ingress.com/intel*
// @include http://*.ingress.com/intel*
// @match https://*.ingress.com/intel*
// @match http://*.ingress.com/intel*
// @include https://*.ingress.com/mission/*
// @include http://*.ingress.com/mission/*
// @match https://*.ingress.com/mission/*
// @match http://*.ingress.com/mission/*
// @grant none
@@METAINFO@@
// ==/UserScript==

@@PLUGINSTART@@
Expand Down
13 changes: 1 addition & 12 deletions plugins/basemap-bing.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,8 @@
// @name IITC plugin: Bing maps
// @category Map Tiles
// @version 0.1.3.@@DATETIMEVERSION@@
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @updateURL @@UPDATEURL@@
// @downloadURL @@DOWNLOADURL@@
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Add the maps.bing.com map layers.
// @include https://*.ingress.com/intel*
// @include http://*.ingress.com/intel*
// @match https://*.ingress.com/intel*
// @match http://*.ingress.com/intel*
// @include https://*.ingress.com/mission/*
// @include http://*.ingress.com/mission/*
// @match https://*.ingress.com/mission/*
// @match http://*.ingress.com/mission/*
// @grant none
@@METAINFO@@
// ==/UserScript==

@@PLUGINSTART@@
Expand Down
13 changes: 1 addition & 12 deletions plugins/basemap-blank.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,8 @@
// @name IITC plugin: Blank map
// @category Map Tiles
// @version 0.1.2.@@DATETIMEVERSION@@
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @updateURL @@UPDATEURL@@
// @downloadURL @@DOWNLOADURL@@
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Add a blank map layer - no roads or other features.
// @include https://*.ingress.com/intel*
// @include http://*.ingress.com/intel*
// @match https://*.ingress.com/intel*
// @match http://*.ingress.com/intel*
// @include https://*.ingress.com/mission/*
// @include http://*.ingress.com/mission/*
// @match https://*.ingress.com/mission/*
// @match http://*.ingress.com/mission/*
// @grant none
@@METAINFO@@
// ==/UserScript==

@@PLUGINSTART@@
Expand Down
13 changes: 1 addition & 12 deletions plugins/basemap-gmaps-gray.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,8 @@
// @name IITC plugin: Gray Google Roads
// @category Map Tiles
// @version 0.1.2.@@DATETIMEVERSION@@
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @updateURL @@UPDATEURL@@
// @downloadURL @@DOWNLOADURL@@
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Add a simplified gray Version of Google map tiles as an optional layer.
// @include https://*.ingress.com/intel*
// @include http://*.ingress.com/intel*
// @match https://*.ingress.com/intel*
// @match http://*.ingress.com/intel*
// @include https://*.ingress.com/mission/*
// @include http://*.ingress.com/mission/*
// @match https://*.ingress.com/mission/*
// @match http://*.ingress.com/mission/*
// @grant none
@@METAINFO@@
// ==/UserScript==

@@PLUGINSTART@@
Expand Down
13 changes: 1 addition & 12 deletions plugins/basemap-kartverket.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,8 @@
// @name IITC plugin: Kartverket.no map tiles
// @category Map Tiles
// @version 0.1.0.@@DATETIMEVERSION@@
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @updateURL @@UPDATEURL@@
// @downloadURL @@DOWNLOADURL@@
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Add the color and grayscale map tiles from Kartverket.no as an optional layer.
// @include https://*.ingress.com/intel*
// @include http://*.ingress.com/intel*
// @match https://*.ingress.com/intel*
// @match http://*.ingress.com/intel*
// @include https://*.ingress.com/mission/*
// @include http://*.ingress.com/mission/*
// @match https://*.ingress.com/mission/*
// @match http://*.ingress.com/mission/*
// @grant none
@@METAINFO@@
// ==/UserScript==

@@PLUGINSTART@@
Expand Down
13 changes: 1 addition & 12 deletions plugins/basemap-nokia-ovi.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,8 @@
// @name IITC plugin: Nokia OVI maps
// @category Map Tiles
// @version 0.1.3.@@DATETIMEVERSION@@
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @updateURL @@UPDATEURL@@
// @downloadURL @@DOWNLOADURL@@
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Add various map layers from Nokia OVI Maps.
// @include https://*.ingress.com/intel*
// @include http://*.ingress.com/intel*
// @match https://*.ingress.com/intel*
// @match http://*.ingress.com/intel*
// @include https://*.ingress.com/mission/*
// @include http://*.ingress.com/mission/*
// @match https://*.ingress.com/mission/*
// @match http://*.ingress.com/mission/*
// @grant none
@@METAINFO@@
// ==/UserScript==

@@PLUGINSTART@@
Expand Down
13 changes: 1 addition & 12 deletions plugins/basemap-opencyclemap.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,8 @@
// @name IITC plugin: OpenCycleMap.org map tiles
// @category Map Tiles
// @version 0.2.0.@@DATETIMEVERSION@@
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @updateURL @@UPDATEURL@@
// @downloadURL @@DOWNLOADURL@@
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Add the OpenCycleMap.org map tiles as an optional layer.
// @include https://*.ingress.com/intel*
// @include http://*.ingress.com/intel*
// @match https://*.ingress.com/intel*
// @match http://*.ingress.com/intel*
// @include https://*.ingress.com/mission/*
// @include http://*.ingress.com/mission/*
// @match https://*.ingress.com/mission/*
// @match http://*.ingress.com/mission/*
// @grant none
@@METAINFO@@
// ==/UserScript==

@@PLUGINSTART@@
Expand Down
13 changes: 1 addition & 12 deletions plugins/basemap-openstreetmap.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,8 @@
// @name IITC plugin: OpenStreetMap.org map tiles
// @category Map Tiles
// @version 0.1.1.@@DATETIMEVERSION@@
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @updateURL @@UPDATEURL@@
// @downloadURL @@DOWNLOADURL@@
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Add the native OpenStreetMap.org map tiles as an optional layer.
// @include https://*.ingress.com/intel*
// @include http://*.ingress.com/intel*
// @match https://*.ingress.com/intel*
// @match http://*.ingress.com/intel*
// @include https://*.ingress.com/mission/*
// @include http://*.ingress.com/mission/*
// @match https://*.ingress.com/mission/*
// @match http://*.ingress.com/mission/*
// @grant none
@@METAINFO@@
// ==/UserScript==

@@PLUGINSTART@@
Expand Down
13 changes: 1 addition & 12 deletions plugins/basemap-stamen.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,8 @@
// @name IITC plugin: Map layers from stamen.com
// @category Map Tiles
// @version 0.2.0.@@DATETIMEVERSION@@
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @updateURL @@UPDATEURL@@
// @downloadURL @@DOWNLOADURL@@
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Add the 'Toner' and 'Watercolor' map layers from maps.stamen.com.
// @include https://*.ingress.com/intel*
// @include http://*.ingress.com/intel*
// @match https://*.ingress.com/intel*
// @match http://*.ingress.com/intel*
// @include https://*.ingress.com/mission/*
// @include http://*.ingress.com/mission/*
// @match https://*.ingress.com/mission/*
// @match http://*.ingress.com/mission/*
// @grant none
@@METAINFO@@
// ==/UserScript==

@@PLUGINSTART@@
Expand Down
13 changes: 1 addition & 12 deletions plugins/basemap-yandex.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,8 @@
// @name IITC plugin: Yandex maps
// @category Map Tiles
// @version 0.2.0.@@DATETIMEVERSION@@
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @updateURL @@UPDATEURL@@
// @downloadURL @@DOWNLOADURL@@
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Add Yandex.com (Russian/Русский) map layers
// @include https://*.ingress.com/intel*
// @include http://*.ingress.com/intel*
// @match https://*.ingress.com/intel*
// @match http://*.ingress.com/intel*
// @include https://*.ingress.com/mission/*
// @include http://*.ingress.com/mission/*
// @match https://*.ingress.com/mission/*
// @match http://*.ingress.com/mission/*
// @grant none
@@METAINFO@@
// ==/UserScript==

@@PLUGINSTART@@
Expand Down
13 changes: 1 addition & 12 deletions plugins/bookmarks-by-zaso.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,8 @@
// @name IITC plugin: Bookmarks for maps and portals
// @category Controls
// @version 0.2.12.@@DATETIMEVERSION@@
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @updateURL @@UPDATEURL@@
// @downloadURL @@DOWNLOADURL@@
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Save your favorite Maps and Portals and move the intel map with a click. Works with sync.
// @include https://*.ingress.com/intel*
// @include http://*.ingress.com/intel*
// @match https://*.ingress.com/intel*
// @match http://*.ingress.com/intel*
// @include https://*.ingress.com/mission/*
// @include http://*.ingress.com/mission/*
// @match https://*.ingress.com/mission/*
// @match http://*.ingress.com/mission/*
// @grant none
@@METAINFO@@
// ==/UserScript==

@@PLUGINSTART@@
Expand Down
13 changes: 1 addition & 12 deletions plugins/cache-details-on-map.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,8 @@
// @name IITC plugin: Cache viewed portal details and always show them on the map
// @category Cache
// @version 0.1.0.@@DATETIMEVERSION@@
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @updateURL @@UPDATEURL@@
// @downloadURL @@DOWNLOADURL@@
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Cache the details of recently viewed portals and use this to populate the map when possible
// @include https://*.ingress.com/intel*
// @include http://*.ingress.com/intel*
// @match https://*.ingress.com/intel*
// @match http://*.ingress.com/intel*
// @include https://*.ingress.com/mission/*
// @include http://*.ingress.com/mission/*
// @match https://*.ingress.com/mission/*
// @match http://*.ingress.com/mission/*
// @grant none
@@METAINFO@@
// ==/UserScript==

@@PLUGINSTART@@
Expand Down
12 changes: 3 additions & 9 deletions plugins/canvas-render.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,12 @@
// @name IITC plugin: Use Canvas rendering
// @category Tweaks
// @version 0.2.0.@@DATETIMEVERSION@@
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @namespace https://github.com/IITC-CE/ingress-intel-total-conversion
// @updateURL @@UPDATEURL@@
// @downloadURL @@DOWNLOADURL@@
// @description [@@BUILDNAME@@-@@BUILDDATE@@] EXPERIMENTAL: use canvas-based rendering. Can be faster when viewing dense areas. Limited testing of the feature so far
// @include https://*.ingress.com/intel*
// @include http://*.ingress.com/intel*
// @match https://*.ingress.com/intel*
// @match http://*.ingress.com/intel*
// @include https://*.ingress.com/mission/*
// @include http://*.ingress.com/mission/*
// @match https://*.ingress.com/mission/*
// @match http://*.ingress.com/mission/*
// @include https://intel.ingress.com/*
// @match https://intel.ingress.com/intel*
// @grant unsafeWindow
// ==/UserScript==

Expand Down
13 changes: 1 addition & 12 deletions plugins/compute-ap-stats.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,8 @@
// @name IITC plugin: Compute AP statistics
// @category Info
// @version 0.4.1.@@DATETIMEVERSION@@
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @updateURL @@UPDATEURL@@
// @downloadURL @@DOWNLOADURL@@
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Displays the per-team AP gains available in the current view.
// @include https://*.ingress.com/intel*
// @include http://*.ingress.com/intel*
// @match https://*.ingress.com/intel*
// @match http://*.ingress.com/intel*
// @include https://*.ingress.com/mission/*
// @include http://*.ingress.com/mission/*
// @match https://*.ingress.com/mission/*
// @match http://*.ingress.com/mission/*
// @grant none
@@METAINFO@@
// ==/UserScript==

@@PLUGINSTART@@
Expand Down
13 changes: 1 addition & 12 deletions plugins/cross_link.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,8 @@
// @name IITC plugin: cross links
// @category Layer
// @version 1.1.2.@@DATETIMEVERSION@@
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @updateURL @@UPDATEURL@@
// @downloadURL @@DOWNLOADURL@@
// @description [@@BUILDNAME@@-@@BUILDDATE@@] EXPERIMENTAL: Checks for existing links that cross planned links. Requires draw-tools plugin.
// @include https://*.ingress.com/intel*
// @include http://*.ingress.com/intel*
// @match https://*.ingress.com/intel*
// @match http://*.ingress.com/intel*
// @include https://*.ingress.com/mission/*
// @include http://*.ingress.com/mission/*
// @match https://*.ingress.com/mission/*
// @match http://*.ingress.com/mission/*
// @grant none
@@METAINFO@@
// ==/UserScript==

@@PLUGINSTART@@
Expand Down
13 changes: 1 addition & 12 deletions plugins/debug-raw-portal-data.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,8 @@
// @name IITC plugin: Debug: Raw portal JSON data
// @category Debug
// @version 0.2.4.@@DATETIMEVERSION@@
// @namespace rawdata
// @updateURL @@UPDATEURL@@
// @downloadURL @@DOWNLOADURL@@
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Developer debugging aid: Add a link to the portal details to show the raw data of a portal.
// @include https://*.ingress.com/intel*
// @include http://*.ingress.com/intel*
// @match https://*.ingress.com/intel*
// @match http://*.ingress.com/intel*
// @include https://*.ingress.com/mission/*
// @include http://*.ingress.com/mission/*
// @match https://*.ingress.com/mission/*
// @match http://*.ingress.com/mission/*
// @grant none
@@METAINFO@@
// ==/UserScript==

@@PLUGINSTART@@
Expand Down

0 comments on commit 0f03130

Please sign in to comment.