Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Ultimate Shitpost
- // @namespace http://tampermonkey.net/
- // @version 0.1
- // @description try to take over the world!
- // @author You
- // @include https://forums.somethingawful.com/showthread.php*
- // @include https://forums.somethingawful.com/newreply.php*
- // @grant none
- // @run-at document-start
- // ==/UserScript==
- (function() {
- 'use strict';
- console.log("RESTARTING!");
- var observation = document.head;
- var observer = new MutationObserver(function(){
- if(document.body){
- document.body.style.visibility='hidden'};
- observer=null;
- })
- observer.observe(observation, {subtree: true, childList: true});
- window.addEventListener('load', (event) => {
- console.log("FULLY LOADED");
- console.log(document.body.style.visibility);
- var userinfos = document.querySelectorAll("td.userinfo, p.editedby, td.postdate, td.postlinks, a.quote_link");
- for (let x of userinfos){
- x.parentNode.removeChild(x);
- }
- var threadamalgam = document.getElementById("thread").appendChild(document.createElement("table"));
- console.log(threadamalgam);
- threadamalgam.id = 'threadamalgam';
- var postbodies = document.querySelectorAll("td.postbody");
- for (let x of postbodies){
- var y = document.getElementById("threadamalgam");
- var newrow=y.appendChild(document.createElement("tr"));
- newrow.appendChild(x);
- }
- var posts = document.querySelectorAll("table.post");
- for (let x of posts){
- x.parentNode.removeChild(x);
- }
- threadamalgam.className=("post");
- document.body.style.visibility="visible";
- })
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement