BlueSilverTranslation UserScript

Some tools to help user's life

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

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

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==UserScript==
// @name         BlueSilverTranslation UserScript
// @version      1.1.1
// @description  Some tools to help user's life
// @author       Askidox
// @match        https://bluesilvertranslations.wordpress.com/*
// @match        https://docs.google.com/document/d/*
// @grant        none
// @namespace https://greasyfork.org/users/190016
// ==/UserScript==

if (document.location.href.indexOf("bluesilvertranslations.wordpress.com") != -1){
    //Add Direct Link
    if (!document.querySelector(".entry-content").innerText.startsWith("Direct link")){
        document.getElementsByClassName("entry-content")[0].innerHTML = "<a href="+document.querySelector("iframe").src+">DIRECT LINK</a>" + document.getElementsByClassName("entry-content")[0].innerHTML ;
    }

    //Blur titles

    //Main title
    document.querySelectorAll("h1")[1].innerHTML = document.querySelectorAll("h1")[1].innerHTML.slice(0, 6) + "<span id=\"title\" style=\"color: transparent; text-shadow: 0 0 20px #000; cursor: pointer\">" + document.querySelectorAll("h1")[1].innerHTML.slice(6)+"</span>";
    //document.querySelectorAll("h1")[1].style = "color: transparent; text-shadow: 0 0 20px #000; cursor: pointer";
    document.querySelector("#title").addEventListener("click", function(){
        document.querySelector("#title").style = "";
    });

    //Buttons
    var aElts = document.querySelector("#nav-below").querySelectorAll("a");
    for(var i = 0 ; i < aElts.length ; i++){
        aElts[i].style = "color: transparent; text-shadow: 0 0 20px #000; cursor: pointer";
        aElts[i].addEventListener("mouseenter", function(event){
            event.target.style = "";
        });
    }

    //Comment Section
    document.querySelector(".comments-title span").style = "color: transparent; text-shadow: 0 0 20px #000; cursor: pointer";

    //Page name
    document.title = document.title.slice(0, 3) + " - "+document.querySelector(".entry-categories a").text;

}
else if (document.location.href.indexOf("https://docs.google.com/document/d/") != -1){
    document.querySelector("h1").children[0].style = "color: transparent; text-shadow: 0 0 20px #000; cursor: pointer";
    document.querySelector("h1").children[0].addEventListener("click", function(){
            document.querySelector("h1").children[0].style = "";
        });
}