-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new plugin: map-timestamp (by pleasantone)
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
Showing
1 changed file
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@@ |