Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name mass reply
- // @include http://boards.4channel.org/*
- // @include https://boards.4channel.org/*
- // @include http://boards.4chan.org/*
- // @include https://boards.4chan.org/*
- // @version 0.0.1.20200402141949
- // @namespace https://greasyfork.org/users/473762
- // @description Mass reply to everyone
- // ==/UserScript==
- (function(){
- 'use strict';
- function addWH(qr){
- var wayheebtn = document.createElement("button");
- var wayheetext = document.createTextNode("CLICKE!!!");
- wayheebtn.setAttribute("style","color:#000000;font-size:23px;background-color:#FF0000");
- wayheebtn.onclick = function(){
- // var arr = Array.from(document.querySelectorAll(".postContainer")).map(e=>{ return ">>"+e.id.slice(2)+" " }).join("")
- var arr = Array.from(document.querySelectorAll(".postContainer")).map(e=>{ return ">>" + e.id.slice(2) })
- document.querySelector('[placeholder="Comment"]').value = arr.slice(Math.max(arr.length - 150, 0)).join(" ") + "\n";
- }
- wayheebtn.appendChild(wayheetext);
- qr.appendChild(wayheebtn);
- }
- var checkqrexists = new MutationObserver(function(mutations, me) {
- var qr = document.getElementById('qr');
- if(qr){
- addWH(qr);
- me.disconnect();
- return;
- }
- });
- checkqrexists.observe(document, { childList: true, subtree: true });
- })();
Advertisement
Add Comment
Please, Sign In to add comment