NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript==
// @name Randomizer for ACMP
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Adds random button for ACMP
// @author Me
// @match http://acmp.ru/index.asp?main=tasks
// @run-at document-load
// @grant none
// ==/UserScript==
(function() {
var bttn = document.createElement('input');
bttn.type = 'button';
bttn.value = 'РАНДОООООМ';
bttn.onclick = function()
{
var n = Math.floor(Math.random() * 700);
var win = window.open('http://acmp.ru/index.asp?main=task&id_task=' + n, '_blank');
win.focus();
};
var el = document.createElement('td');
el.append(bttn);
document.getElementsByTagName('form')[0].children[0].children[0].children[1].append(el);
})();