Skip to content

Instantly share code, notes, and snippets.

@olee
Created June 14, 2015 00:30
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 olee/08593c862a8af2fdc311 to your computer and use it in GitHub Desktop.
Save olee/08593c862a8af2fdc311 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name cookieclicker
// @namespace de.olee.cookieclicker
// @include http://orteil.dashnet.org/cookieclicker/
// @version 1
// @grant none
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
// ==/UserScript==
function update() {
var idx = 0;
while (true) {
var el = $('#productPrice' + idx);
if (el.length == 0)
break;
var data = Game.ObjectsById[idx];
el.html(data.storedCps.toFixed(1) + ' / ' + data.price + ' = ' + (data.storedCps / data.price * 1000).toFixed(2) + ' mcps/c');
idx++;
}
}
setInterval(update, 1000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment