Clone the repo and drop the folder into "chrome://extensions" page.
Open any web page ("about:blank" will work too) and a console, then inspect and play with MY_API
global variable.
//http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript | |
Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15); |
function worker() { | |
setInterval(function() { | |
postMessage({foo: "bar"}); | |
}, 1000); | |
} | |
var code = worker.toString(); | |
code = code.substring(code.indexOf("{")+1, code.lastIndexOf("}")); | |
var blob = new Blob([code], {type: "application/javascript"}); |
var nodes = document.querySelectorAll(".audio_remove"), i = 0, inter = setInterval( function() { if (i == nodes.length) { clearInterval(inter);}; var evt = document.createEvent("MouseEvents"); evt.initMouseEvent("click", true, true, nodes[i], 0, 0, 0, 0, 0, false, false, false, false, 0, null); nodes[i].dispatchEvent(evt); i++; }, 350); |
var MathHelper = { | |
// Get a value between two values | |
clamp: function (value, min, max) { | |
if (value < min) { | |
return min; | |
} | |
else if (value > max) { | |
return max; | |
} |