Skip to content

Instantly share code, notes, and snippets.

@pkordylewski
Last active November 22, 2017 08:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pkordylewski/4cb4370fcfe512d4ca6ad022dce2b932 to your computer and use it in GitHub Desktop.
Save pkordylewski/4cb4370fcfe512d4ca6ad022dce2b932 to your computer and use it in GitHub Desktop.
Userscript / Global Page Timer
// ==UserScript==
// @name Global Page Timer
// @include *pm.hq.imos.net*
// @include *redmine.imos.net*
// @version 0.1.0
// @require https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js
// @require https://raw.github.com/odyniec/jQuery-tinyTimer/master/jquery.tinytimer.min.js
// @grant none
// ==/UserScript==
var usJQ = $.noConflict(true);
usJQ('body').append('<div style="position: sticky; z-index: 9999; float: right; bottom: 0; padding: 2px 5px; display: block; background-color: green; font-family: Verdana, sans-serif; font-size: 14px; font-weight: bold; color: white;">Time on Page: <span id="imos-page-timer"></span></div>');
usJQ('#imos-page-timer').tinyTimer({
from: Date.now(),
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment