// ==UserScript== // @name New Userscript // @namespace http://tampermonkey.net/ // @version 0.1 // @description try to take over the world! // @author You // @match http://inrs.elmg.net/outils/parcours/launch.php* // @grant none // ==/UserScript== (function() { 'use strict'; parent.ELMG_COURSE_UI.my_ajaxq = function (options) { let text = options.data; var sec_random = Math.floor(Math.random() * 59); var min_random = Math.floor(Math.random() * 15) + 3; text = text.replace(/(score_raw&valeur\[\d*\]=)[^&]*/g, "$1100"); text = text.replace(/(score_scaled&valeur\[\d*\]=)[^&]*/g, "$11"); text = text.replace(/(progress_measure&valeur\[\d*\]=)[^&]*/g, "$11"); text = text.replace(/(completion_status&valeur\[\d*\]=)[^&]*/g, "$1completed"); text = text.replace(/(success_status&valeur\[\d*\]=)[^&]*/g, "$1passed"); text = text.replace(/(session_time&valeur\[\d*\]=)[^&]*/g, "$10%3A" + min_random + "%3A" + sec_random + ".00"); options.data = text; ajaxq("ELMG_COURSE_UI_AJAXQ", options); }; })();