您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
hwm spam script
当前为
// ==UserScript== // @name hwm_spam // @namespace http://tampermonkey.net/ // @version 2.1 // @author Лосось // @description hwm spam script // @match /^https{0,1}:\/\/((www|qrator|my)\.(heroeswm|lordswm)\.(ru|com)|178\.248\.235\.15)\/(sms|sms-create|home).php*/ // @include /^https{0,1}:\/\/((www|qrator|my)\.(heroeswm|lordswm)\.(ru|com)|178\.248\.235\.15)\/(sms|sms-create|home).php*/ // @license MIT // @grant none // ==/UserScript== (function () { 'use strict'; //common styles const common_btn_style = 'border: none; padding:5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #592c08; font-family: verdana,geneva,arial cyr; text-align: center; font-weight: 700; background: url(../i/homeico/art_btn_bg_gold.png) #dab761; background-size: 100% 100%; border-radius: 5px; box-shadow: inset 0 0 0 1px #fce6b0,inset 0 0 0 2px #a78750,0 0 0 1px rgba(0,0,0,.13); line-height: 25px; cursor: pointer; transition: -webkit-filter .15s;transition: filter .15s;' // local storage vars let spam_list = JSON.parse(localStorage.getItem('spam_list')); let subjectLS = JSON.parse(localStorage.getItem('subjectLS')); let msgLS = JSON.parse(localStorage.getItem('msgLS')); let timerLS = Number(JSON.parse(localStorage.getItem('timerLS'))); let toogleStopSpam = JSON.parse(localStorage.getItem('toogleStopSpam')); let toogleStopSpamVar = toogleStopSpam; let isShowScriptLS = JSON.parse(localStorage.getItem('hwmSpamScriptToogle')); let isShowScript = isShowScriptLS; if (!spam_list) { localStorage.setItem('spam_list', JSON.stringify([])); location.reload(); } if (!subjectLS) { localStorage.setItem('subjectLS', JSON.stringify('введите тему')); location.reload(); } if (!msgLS) { localStorage.setItem('msgLS', JSON.stringify('введите сообщение')); location.reload(); } if (!timerLS) { localStorage.setItem('timerLS', JSON.stringify(75000)); location.reload(); } if (toogleStopSpam === null) { localStorage.setItem('toogleStopSpam', JSON.stringify(false)); location.reload(); } if (!isShowScriptLS) { localStorage.setItem('hwmSpamScriptToogle', JSON.stringify(false)); } // ui buttons let showScriptBtn = document.createElement('button'); showScriptBtn.innerText = `${isShowScript ? 'Show script' : 'Hide script'}`; showScriptBtn.style = `position: absolute; left: 10px; top: 2px; z-index: 999997; ${common_btn_style}`; let stopSpamBtn = document.createElement('div'); stopSpamBtn.innerText = toogleStopSpam ? 'Остановить спам' : 'Продолжить спам'; stopSpamBtn.style = `position: absolute; left: 120px; top: 2px; z-index: 999997; ${common_btn_style}`; let block = document.createElement('div'); block.style = 'position: absolute; left: 10px; top: 40px; z-index: 999999; width: 400px; min-height: 50px; background: #f5f3ea; display: flex; flex-direction: column; align-items: center; padding: 5px;'; block.style.visibility = isShowScript ? 'visible' : 'hidden'; let addInputNicks = document.createElement('input'); addInputNicks.style = 'width: 400px; height: 50px; background: transparent; border: 1px solid black; color: black; font-size: 16px; margin-bottom: 3px;'; addInputNicks.placeholder = 'вставьте или введите никнеймы'; let timerBlock = document.createElement('div'); timerBlock.style = 'display: flex; flex-direction: column; align-items: center; gap: 5px'; let timer = document.createElement('div'); timer.innerText = `Таймер ${timerLS / 1000} сек` timer.style = 'color: black'; let setTimerBtn = document.createElement('input'); setTimerBtn.style = 'border: 1px solid black; width: 120px; height: 30px; background: transparent; color: black; border-radius: 10px; margin-top: 5px;'; setTimerBtn.placeholder = 'введите таймер'; let subjectInput = document.createElement('input'); subjectInput.value = subjectLS; subjectInput.placeholder = 'введите тему'; subjectInput.style = 'width: 400px; height: 50px; background: transparent; border: 1px solid black; color: black; font-size: 16px; margin-bottom: 3px;'; let msgInput = document.createElement('textarea'); msgInput.value = msgLS; msgInput.placeholder = 'введите сообщение'; msgInput.style = 'width: 400px; height: 150px; background: transparent; border: 1px solid black; black: white; font-size: 16px; margin-bottom: 3px;'; let addMessageBtn = document.createElement('button'); addMessageBtn.innerText = 'Добавить/изменить сообщение'; addMessageBtn.style = 'border: 1px solid black; background: pink; width: 250px; height: 30px; margin-top: 1px; margin-bottom: 3px; cursor: pointer; font-weigth: bold; color: black; border-radius: 10px;' let uiList = document.createElement('ol'); uiList.style = ''; let deleteAllNicksBtn = document.createElement('button'); deleteAllNicksBtn.innerText = 'удалить весь список'; deleteAllNicksBtn.style = 'border: 1px solid black; width: 140px; height: 50px; background: transparent; color: black; cursor: pointer; border-radius: 10px;'; deleteAllNicksBtn.addEventListener('click', () => { let conf = confirm('точно удалить весь список?'); if (!conf) return; spam_list = []; localStorage.setItem('spam_list', JSON.stringify(spam_list)); location.reload(); }); showScriptBtn.addEventListener('click', () => { isShowScript = !isShowScript; localStorage.setItem('hwmSpamScriptToogle', isShowScript); block.style.visibility = isShowScript ? 'visible' : 'hidden'; showScriptBtn.innerText = `${isShowScript ? 'Show script' : 'Hide script'}`; }) stopSpamBtn.addEventListener('click', () => { toogleStopSpamVar = !toogleStopSpamVar localStorage.setItem('toogleStopSpam', toogleStopSpamVar); location.reload(); }) setTimerBtn.addEventListener('keypress', (e) => { if (e.key === 'Enter') { localStorage.setItem('timerLS', JSON.stringify(Number(setTimerBtn.value) * 1000)); location.reload(); } }) subjectInput.addEventListener('keypress', (e) => { if (e.key === 'Enter') { localStorage.setItem('subjectLS', JSON.stringify(subjectInput.value)); location.reload(); } }) addMessageBtn.addEventListener('click', () => { localStorage.setItem('msgLS', JSON.stringify(msgInput.value)); location.reload(); }) addInputNicks.addEventListener('keypress', (e) => { if (e.key === 'Enter') { let text = addInputNicks.value; text = text.split(','); text = text.filter(el => el.length !== 0); text = text.map(el => el.trim()); spam_list = [...spam_list, ...text]; localStorage.setItem('spam_list', JSON.stringify(spam_list)); location.reload(); } }) spam_list.forEach(el => { let li = document.createElement('li'); let nickname = document.createElement('span'); let deleteNickBtn = document.createElement('button'); deleteNickBtn.style = 'border: 1px dotted red; border-radius: 50%; cursor: pointer; margin-left: 5px;' deleteNickBtn.innerText = 'x'; nickname.innerText = el; nickname.style = 'color: black;'; deleteNickBtn.addEventListener('click', () => { spam_list = spam_list.filter(nick => nick !== el); localStorage.setItem('spam_list', JSON.stringify(spam_list)); location.reload(); }) li.appendChild(nickname); li.appendChild(deleteNickBtn); uiList.appendChild(li); }) timerBlock.appendChild(setTimerBtn); timerBlock.appendChild(timer); block.appendChild(addInputNicks); block.appendChild(subjectInput); block.appendChild(msgInput); block.appendChild(addMessageBtn); block.appendChild(deleteAllNicksBtn); block.appendChild(timerBlock); block.appendChild(uiList); document.body.appendChild(showScriptBtn); document.body.appendChild(stopSpamBtn); document.body.appendChild(block); if (toogleStopSpam === false) return; if (location.href === 'https://my.lordswm.com/sms.php') { if (spam_list.length === 0) return; location.replace('https://my.lordswm.com/sms-create.php'); } if (location.href === 'https://www.heroeswm.ru/sms.php') { if (spam_list.length === 0) return; location.replace('https://www.heroeswm.ru/sms-create.php'); } if (location.href === 'https://my.lordswm.com/sms-create.php') { if (spam_list.length === 0) return; let nickInput = document.getElementsByName("mailto")[0].value = spam_list[0]; let subjectInput = document.getElementsByName("subject")[0].value = subjectLS; let msgInput = document.getElementsByName("msg")[0].value = msgLS; setTimeout(() => { spam_list.shift(); localStorage.setItem('spam_list', JSON.stringify(spam_list)); let submitBtn = document.getElementsByName("subm")[0].click(); }, timerLS); } if (location.href === 'https://www.heroeswm.ru/sms-create.php') { if (spam_list.length === 0) return; let nickInput = document.getElementsByName("mailto")[0].value = spam_list[0]; let subjectInput = document.getElementsByName("subject")[0].value = subjectLS; let msgInput = document.getElementsByName("msg")[0].value = msgLS; setTimeout(() => { spam_list.shift(); localStorage.setItem('spam_list', JSON.stringify(spam_list)); let submitBtn = document.getElementsByName("subm")[0].click(); }, timerLS); } })();