Skip to content

Commit

Permalink
new plugin: map-timestamp (by pleasantone)
Browse files Browse the repository at this point in the history
Add a timestamp to the bottom right corner of the map

iitc-project/ingress-intel-total-conversion#1192

Merge commit 'refs/pull/1192/head' of https://github.com/iitc-project/ingress-intel-total-conversion into new-plugins
  • Loading branch information
johndoe committed Jul 2, 2019
2 parents 67b1894 + 871f925 commit f6135e3
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions plugins/map-timestamp.user.js
Original file line number Diff line number Diff line change
@@ -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('<div id="timestamp" style="padding: 8px;"></div>');

window.plugin.mapTimestamp.update();
};

window.plugin.mapTimestamp.update = function() {

var text = 'Time: ' + new Date();

$('#timestamp').text(text);

setTimeout (window.plugin.mapTimestamp.update, 60*1000);
};

var setup = window.plugin.mapTimestamp.setup;

// PLUGIN END //////////////////////////////////////////////////////////

@@PLUGINEND@@

0 comments on commit f6135e3

Please sign in to comment.