From 64559935bcab265a8cb764f32a8c087f9c18c5e9 Mon Sep 17 00:00:00 2001 From: Paul Traina Date: Tue, 28 Feb 2017 16:39:00 -0800 Subject: [PATCH 1/2] Add a timestamp to the bottom right corner of the map --- plugins/map-timestamp.user.js | 50 +++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 plugins/map-timestamp.user.js diff --git a/plugins/map-timestamp.user.js b/plugins/map-timestamp.user.js new file mode 100644 index 000000000..4add1b094 --- /dev/null +++ b/plugins/map-timestamp.user.js @@ -0,0 +1,50 @@ +// ==UserScript== +// @id iitc-plugin-map-timestamp +// @name IITC plugin: Add timestamp for map (for screnshots) +// @category Info +// @version 0.0.1.@@DATETIMEVERSION@@ +// @namespace https://github.com/jonatkins/ingress-intel-total-conversion +// @updateURL @@UPDATEURL@@ +// @downloadURL @@DOWNLOADURL@@ +// @description [@@BUILDNAME@@-@@BUILDDATE@@] Show the times used for the septicycle and checkpoints for regional scoreboards. +// @include https://www.ingress.com/intel* +// @include http://www.ingress.com/intel* +// @match https://www.ingress.com/intel* +// @match http://www.ingress.com/intel* +// @include https://www.ingress.com/mission/* +// @include http://www.ingress.com/mission/* +// @match https://www.ingress.com/mission/* +// @match http://www.ingress.com/mission/* +// @grant none +// ==/UserScript== + +@@PLUGINSTART@@ + +// PLUGIN START //////////////////////////////////////////////////////// + + +// use own namespace for plugin +window.plugin.mapTimestamp = function() {}; + +window.plugin.mapTimestamp.setup = function() { + + // add a div in front of the update status line + $('#updatestatus').prepend('
'); + + window.plugin.mapTimestamp.update(); +}; + +window.plugin.mapTimestamp.update = function() { + + var html = 'Time: ' + new Date(); + + $('#timestamp').html(html); + + setTimeout (window.plugin.mapTimestamp.update, 60*1000); +}; + +var setup = window.plugin.mapTimestamp.setup; + +// PLUGIN END ////////////////////////////////////////////////////////// + +@@PLUGINEND@@ From 871f92592a3a0247b49717bbfd7be8a9be9ae660 Mon Sep 17 00:00:00 2001 From: Paul Traina Date: Tue, 11 Apr 2017 15:24:21 -0700 Subject: [PATCH 2/2] Use .text instead of .html --- plugins/map-timestamp.user.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/map-timestamp.user.js b/plugins/map-timestamp.user.js index 4add1b094..aa3f7058b 100644 --- a/plugins/map-timestamp.user.js +++ b/plugins/map-timestamp.user.js @@ -36,9 +36,9 @@ window.plugin.mapTimestamp.setup = function() { window.plugin.mapTimestamp.update = function() { - var html = 'Time: ' + new Date(); + var text = 'Time: ' + new Date(); - $('#timestamp').html(html); + $('#timestamp').text(text); setTimeout (window.plugin.mapTimestamp.update, 60*1000); };