Greasy Fork is available in English.

DeviantArt Eclipse - Extras

Redesign

Stan na 16-05-2020. Zobacz najnowsza wersja.

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

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

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         DeviantArt Eclipse - Extras
// @namespace    http://tampermonkey.net/
// @description  Redesign
// @author       Isi-Daddy
// @include      https://www.deviantart.com/*
// @include      https://www.deviantart.com/notifications/watch/*
// @version 1.0
// @grant          none
// @require http://code.jquery.com/jquery-3.4.1.min.js
// @require  http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js
// @require https://greasyfork.org/scripts/5392-waitforkeyelements/code/WaitForKeyElements.js?version=115012

// ==/UserScript==

//Blur Image avoid
waitForKeyElements (
    ".ReactModal__Content",
    pictureblur
);

function pictureblur (subj){
    var newimg = $("div[data-hook='art_stage']").children("div").children("div:nth-child(2)").children("div").children("img").attr("src");
    var imgage = $("div[data-hook='art_stage']").children("div").children("div:nth-child(2)").children("div").children("img");

    var theImage = new Image();
    theImage.src = newimg;
    var imageWidth = theImage.width;
    var imageHeight = theImage.height;

    $(".ReactModal__Content div img").css({
        "max-width": "100%",
        "max-height": "100%",
        "height": "auto",
        "width": "100%"
    });

    var i = 0;

    $(".ReactModal__Content div img").click(function() {
        if(i == 0){
            $(".ReactModal__Content div img").css({
                "max-width": imageWidth,
                "max-height": imageHeight,
                "height": imageHeight,
                "width": imageWidth
            });
            i = 1;
        } else if (i == 1){
            $(".ReactModal__Content div img").css({
                "max-width": "100%",
                "max-height": "100%",
                "height": "auto",
                "width": "100%"
            });
            i=0;
        }
    });
}

/* timestamp*/
waitForKeyElements (
    "time",
    klassentest
);

function klassentest (subj) {
    var time = subj.attr("datetime").replace("T", " ").slice(0, -5);
    subj.append("<div class='time'>" + time + "</div>");
    subj.append("<div class='after'></div>");

    $(".time").css({
        "visibility" : "hidden",
        "position" : "absolute",
        "color" : "#d6ded4",
        "top": "-26px",
        "border": "1px solid #5c5c5c",
        "padding": "3px 10px",
        "margin-left": "-20px",
        "background" : "#475c4d"
    });

    $(".after").css({
        "visibility":"hidden",
        "width": "0",
        "height": "0",
        "border-left": "5px solid transparent",
        "border-right": "5px solid transparent",
        "border-top": "5px solid #475c4d",
        "position" : "absolute",
        "top": "-5px",
        "margin-left": "30px"
    });

    subj.mouseenter(function(event)
    {
        event.stopPropagation()
        $(this).children().addClass("show");
        $(".time.show, .after.show").css({"visibility": "visible"});
    }).mouseleave(function(event)
    {
        event.stopPropagation()
        $(this).children().removeClass("show");
        $(".time,.after").css({"visibility": "hidden"});
    })
}