RedditMotivator

Replaces the whole reddit page with a quote

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

You will need to install an extension such as Tampermonkey to install this script.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

// ==UserScript==
// @name         RedditMotivator
// @namespace    http://tampermonkey.net/
// @version      0.4
// @license      MIT
// @description  Replaces the whole reddit page with a quote
// @author       Njan.codes
// @match        https://www.reddit.com/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=youtube.com
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    let quote = "GO DO THE RUST LAB(DS PRACTICALS) PROJECT PLEASE BRUV STOP LOOKING REDDIT BRUV";
    setTimeout(function(){
        const wholePage = document.getElementById('2x-container');
        wholePage.remove();


        let h1 = document.createElement('h1');
        let styleH1 = {
            background: 'gray',
            color: 'white',
            padding: '20px',
            fontSize: '100',
            textAlign: 'center',
            position: 'absolute',
            zIndex: '10000',
            width: '100%'
        }
        Object.assign(h1.style,styleH1);
        h1.innerHTML = quote;

        let body = document.body;
        body.insertBefore(h1,body.firstChild);
    },2000);

    setInterval(function (){

        let main = document.querySelector('main');
        let mastHead = document.querySelector('div.masthead');
        let nav = document.querySelector('nav');
        let morePost = document.querySelector('div.block');

        if(main != null){
            main.remove();
        }

        if(mastHead != null){
            mastHead.remove();
        }

        if(nav != null){
            nav.remove();
        }

        if(morePost != null){
            morePost.remove();
        }


    },100);

    // Your code here...
    
})();