Greasy Fork is available in English.

SweClike

More visible active like button

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

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

(I already have a user script manager, let me install it!)

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.

ستحتاج إلى تثبيت إضافة مثل Stylus لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتتمكن من تثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

(لدي بالفعل مثبت أنماط للمستخدم، دعني أقم بتثبيته!)

// ==UserScript==
// @name         SweClike
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  More visible active like button
// @author       flashen
// @match        https://www.sweclockers.com/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=sweclockers.c....
// @grant        none
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';

    var element = document.getElementsByClassName("like");

    for (var i = 0; i < element.length; i++) {
        element[i].addEventListener("click", buttonClick(i));
    }

    function buttonClick(i) {
        var isLiked = "";
        var isToggle = false;
        var isClassName = document.getElementsByClassName.bind(document);

        return function() {

            if (!isToggle) {

                isToggle = true;

                if (window.getComputedStyle(isClassName("like")[i].children[0]).getPropertyValue("fill") == "rgb(210, 96, 0)") {
                    isLiked = "rgb(210, 96, 0)";
                }

                isClassName('like')[i].setAttribute("style", "background-color: #546678 !important; color: #fff! important; border: 1px solid #424242 !important");
                isClassName('like')[i].children[0].setAttribute("style", "fill: #fff !important");
            } else {
                isToggle = false;

                if (isLiked == 'rgb(210, 96, 0)') {
                    isClassName('like')[i].setAttribute("style", "background-color: #f7f6f5 !important; color: #d26000 !important;");
                    isClassName('like')[i].children[0].setAttribute("style", "fill: #d26000 !important");
                } else {
                    isClassName('like')[i].setAttribute("style", "background-color: #f7f6f5 !important; color: dimgray !important;");
                    isClassName('like')[i].children[0].setAttribute("style", "fill: dimgray !important");
                }
            }
        };
    }
})();