Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name DJT Can Skip
- // @version 0.1
- // @description Sample text
- // @match https://boards.4channel.org/jp/*
- // @icon https://www.google.com/s2/favicons?sz=64&domain=4channel.org
- // @grant none
- // ==/UserScript==
- (function() {
- 'use strict'
- const THRESHOLD = 0.075
- if (!document.querySelector('.subject').textContent.includes('DJT')) return
- const a = Array.from(document.querySelectorAll('blockquote'))
- const skip = a
- .map(x => (x.textContent.match(/iq/ig) || []).length)
- .reduce((acc, cur) => acc + cur) / a.length > THRESHOLD
- if (skip) {
- const msg = document.createElement('div')
- msg.innerHTML = 'SKIP SKIP SKIP'
- msg.style = 'color: red; font-size: 100px; position: fixed; top: 0; right: 0; width: 100vw; height: 100vh; display: flex; align-items: center; justify-content: center;'
- document.body.append(msg)
- }
- })();
Advertisement
Add Comment
Please, Sign In to add comment