BlueSilverTranslation UserScript

Some tools to help user's life

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==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 = "";
        });
}