Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a timestamp to the bottom right corner of the map #1192

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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@@