您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
hwm spam script
当前为
// ==UserScript== // @name hwm_spam // @namespace http://tampermonkey.net/ // @version 1.0 // @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'; 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'))); 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(60000)); location.reload(); } let showScriptBtn = document.createElement('button'); showScriptBtn.innerText = 'Spam script'; showScriptBtn.style = 'position: absolute; left: 10px; top: 2px; z-index: 999998; ' let isShowScriptLS = JSON.parse(localStorage.getItem('hwmSpamScriptToogle')); let isShowScript = isShowScriptLS; if (!isShowScriptLS) { localStorage.setItem('hwmSpamScriptToogle', JSON.stringify(false)); } showScriptBtn.addEventListener('click', () => { isShowScript = !isShowScript; localStorage.setItem('hwmSpamScriptToogle', isShowScript); block.style.visibility = isShowScript ? 'visible' : 'hidden'; }) let block = document.createElement('div'); block.style = 'position: absolute; left: 10px; top: 24px; z-index: 999999; width: 400px; min-height: 50px; background: rgb(238,174,202); background: radial-gradient(circle, rgba(238,174,202,1) 0%, rgba(148,187,233,1) 100%); display: flex; flex-direction: column; align-items: center;'; block.style.visibility = isShowScript ? 'visible' : 'hidden'; let addInputNicks = document.createElement('input'); addInputNicks.style = 'width: 400px; height: 50px; background: transparent; border: 1px solid white; color: white; font-size: 16px; margin-bottom: 3px;'; addInputNicks.placeholder = 'вставьте или введите никнеймы'; let subjectInput = document.createElement('input'); subjectInput.value = subjectLS; subjectInput.placeholder = 'введите тему'; subjectInput.style = 'width: 400px; height: 50px; background: transparent; border: 1px solid white; color: white; font-size: 16px; margin-bottom: 3px;'; subjectInput.addEventListener('keypress', (e) => { if (e.key === 'Enter') { localStorage.setItem('subjectLS', JSON.stringify(subjectInput.value)); location.reload(); } }) let msgInput = document.createElement('textarea'); msgInput.value = msgLS; msgInput.placeholder = 'введите сообщение'; msgInput.style = 'width: 400px; height: 150px; background: transparent; border: 1px solid white; color: white; font-size: 16px; margin-bottom: 3px;'; let addMessageBtn = document.createElement('button'); addMessageBtn.innerText = 'Добавить/изменить сообщение'; addMessageBtn.style = 'border: 1px solid white; background: pink; width: 250px; height: 30px; margin-top: 1px; margin-bottom: 3px; cursor: pointer; font-weigth: bold; color: white; border-radius: 10px;' addMessageBtn.addEventListener('click', () => { localStorage.setItem('msgLS', JSON.stringify(msgInput.value)); location.reload(); }) let uiList = document.createElement('ol'); uiList.style = ''; let deleteAllNicksBtn = document.createElement('button'); deleteAllNicksBtn.innerText = 'удалить весь список'; deleteAllNicksBtn.style = 'border: 1px solid white; width: 140px; height: 50px; background: transparent; color: white; 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(); }); 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: white;'; 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); }) 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(); } }) block.appendChild(addInputNicks); block.appendChild(subjectInput); block.appendChild(msgInput); block.appendChild(addMessageBtn); block.appendChild(deleteAllNicksBtn); block.appendChild(uiList); document.body.appendChild(showScriptBtn); document.body.appendChild(block); 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(); }, 45000); } })();