/*
* @title super_mind_free
* @description my bookmarklet
* @include http://mindfree.jp/#/mindfree
* @license MIT License
* @require
*/
window.MouseUtil = { };
['mousemove', 'mousedown', 'mouseup', 'click'].forEach(function (method) {
window.MouseUtil[method] = function(x, y) {
if (!x) x = 0;
if (!y) y = 0;
var event = document.createEvent("MouseEvents");
event.initMouseEvent(method, true, false, window,
0, x, y, x, y, false, false, true, false, 0, null );
return event;
}
});
setInterval(function(){
document.querySelector("canvas").dispatchEvent(window.MouseUtil.mousemove(960 + Math.floor(Math.random() * 400), 180));
document.querySelector("canvas").dispatchEvent(window.MouseUtil.click(0, 0));
}, 0)