NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript== // @name Alfring Automator // @namespace http://tampermonkey.net/ // @version 0.1 // @description try to take over the world! // @author t.me/innocoffee // @matches http://alfring.ru/* // @grant none // @license GPL-3.0-or-later; http://www.gnu.org/licenses/gpl-3.0.txt // ==/UserScript== function chistka_xuyni() { var elems = ['.wp-video', 'iframe', '#comments', '.adsbygoogle', '.sidebar-1.widget-area', '.site-info', '.site-header', 'img', 'p', '#mtq_instructions-1']; for(var j = 0; j < elems.length; j++) { if(document.querySelector(elems[j])) { var elements = document.querySelectorAll(elems[j]); for(var i = 0; i < elements.length; i++){ elements[i].remove(); } } } } var mtq; var interval; function prepare_array() { var mtq = document.querySelectorAll('#mtq_variables input'); window.mtq = []; for (var i = 0; i < mtq.length; i++) { if(mtq[i].id.includes('correct') && mtq[i].value == 1 && mtq[i].id.split('-').length == 4){ window.mtq.push(mtq[i].id); } } } window.last_quest = ''; function reshit_xuynu() { console.log('Начинаю вбив...'); mtq_start_quiz(1); function process() { let i = window.i; //mtq_button_click(window.mtq[i].split('-')[1], window.mtq[i].split('-')[2], window.mtq[i].split('-')[3]); document.querySelector('#' + window.mtq[i].split('mtq_is_correct-').join('mtq_row-')).click(); if(window.mtq[i].split('-')[1] != window.last_quest) { setTimeout(() => {mtq_next_nav(1);}, 1000); window.last_quest = window.mtq[i].split('-')[1]; } window.i ++; console.log('Вбил ответ ' + window.mtq[i]); if(window.i >= window.mtq.length) { clearInterval(interval); console.log('Я закончил. Спасибо за использование софта by @innocoffee software <3'); } } //for(var i = 0; i < mtq.length; i++) { // setTimeout(process(i), 1000 * i); //} interval = setInterval(process, 3000); } chistka_xuyni(); console.clear(); document.querySelector('#mtq_start_button-1').onclick = () => { console.clear(); console.log('Начинаю работу...'); console.log('Сканирую ответы...'); window.i = 0; prepare_array(); reshit_xuynu(); }