exh which is gif?

Highlights .gif files in gallery view by adding a glow around the thumbnail. Customizable settings are shown in the right sidebar, under the petition rename/expunge links.

2024-10-30 या दिनांकाला. सर्वात नवीन आवृत्ती पाहा.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         exh which is gif?
// @namespace    https://sleazyfork.org/en/scripts/436971
// @version      0.3
// @description  Highlights .gif files in gallery view by adding a glow around the thumbnail. Customizable settings are shown in the right sidebar, under the petition rename/expunge links.
// @author       coombrain
// @match        https://exhentai.org/g/*
// @match        https://e-hentai.org/g/*
// @icon         none
// @grant        GM.setValue
// @grant        GM.getValue
// @require      http://code.jquery.com/jquery-latest.min.js
// @license      MIT
// ==/UserScript==
var $ = window.jQuery;

var defc = GM.getValue("wigColor", "#00ffff").then(function(wigColor) { defc = wigColor; });
var defs = GM.getValue("wigSize", 8).then(function(wigSize) { defs = wigSize; });

(function() {
    'use strict';

    $(document).ready(function () {
        $("#gd5").append(`<div class="wigcn"><a class="g2 wigst" href="#" style="font-weight:bold;">Which is GIF? ⚙️</a></div>`);
        $(".wigcn").append(`<div class="wigcns"><div class="tha nosel wigsto"><input type="color" name="which is gif? glow color" id="cpick" value="${defc}" style="border:none;padding:0;margin:0;height:24px;"></div>`);
        $(".wigcn").append(`<div class="tha nosel wigsto"><input type="number" name="which is gif? glow size" id="wigsz" min="0" value="${defs}" style="border:none;padding:0 0 0 5px;margin:none;max-width:50px;height:24px;"></div></div>`);

        $("#cpick, #wigsz").on("change", wigupd);

        //-----------------
        // Uncomment the line below to hide the setting sidebar once you've set your desired glow color/size. Comment it out again to have it appear again.
        // $(".wigcn").css({"display":"none"});
        //-----------------

        $(".wigsto").css({"display":"none","margin":"0 auto 0 10px"});
        $(".wigst").css({"margin":"0 auto 0 10px","max-width":"150px","padding":"0"}).click(function() {
            $(".wigsto").css("display",$(".wigsto").css("display") == "none" ? "inline-block" : "none");
        });

        wigupd();

        function wigupd() {
            let WG_GLOW_COLOR = $("#cpick")[0].value;
            let WG_GLOW_SIZE = $("#wigsz")[0].value;
            GM.setValue("wigColor", WG_GLOW_COLOR);
            GM.setValue("wigSize", WG_GLOW_SIZE);
            wigApply(WG_GLOW_COLOR, WG_GLOW_SIZE);
        }

        function wigApply(wigc, wigs) {
            $("#gdt a div").each(function() {
                let tmtl = $(this).attr("title");
                let tmei = tmtl.lastIndexOf(".") + 1;
                let tmex = tmtl.substr(tmei);

                if (tmex == "gif" || tmex == "apng" || tmex == "webm" || tmex == "webp") {
                    //as of writing only gif is supported on exh galleries so lol
                    $(this).css("box-shadow", `0 0 ${wigs}px ${wigc}`);
                }
            });
       }
    });

})();