Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //HIDER CSS
- var showposts = 30;
- setTimeout(function () {
- if (window.location.href.indexOf('res') !== -1) {
- dostuff();
- }
- }, 1000);
- function dostuff() {
- var hider = document.createElement('style');
- var magic = '.board-container .hider:after{content:"Show Hidden Posts"; color:red;} .board-container .hider:checked{content:"Hide Posts";} .board-container .hider:not(:checked) + .thread-container div:not(:nth-last-child(-n+'+showposts+')){display:none;} .thread-container .post-container:nth-child(1){display:block !important;}';
- hider.innerHTML = magic;
- document.head.appendChild(hider);
- var cssbutton = document.createElement('input');
- cssbutton.className = 'hider';
- cssbutton.style = 'width: 260px;';
- cssbutton.type = 'checkbox';
- var parent = document.getElementsByClassName('board-container')[0]
- parent.insertBefore(cssbutton, document.getElementsByClassName('thread-container')[0]);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement