f95zone tweaks

f95zone exclude tags and min like filter

ของเมื่อวันที่ 01-12-2020 ดู เวอร์ชันล่าสุด

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey, Greasemonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

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.

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.

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

// ==UserScript==
// @name         f95zone tweaks
// @namespace    f95zone tweaks
// @version      0.2
// @description  f95zone exclude tags and min like filter
// @author       3xd_tango
// @match        https://f95zone.to/latest/
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    let css = `
  div[data-tags*='harem'] {/*<--------------------------- Favorites Tags*/
          -webkit-box-shadow:0px 0px 10px 1px #0011ff ;
          -moz-box-shadow:0px 0px 10px 1px #0011ff ;
          box-shadow:0px 0px 10px 1px #0011ff !important;
            }

  div[data-tags*='incest'] {
              -webkit-box-shadow:0px 0px 10px 1px #ff0000 ;
              -moz-box-shadow:0px 0px 10px 1px #ff0000 ;
              box-shadow:0px 0px 10px 1px #ff0000 !important;
            }

div[data-tags*='female protagonist'],div[data-tags*='text based'],div[data-tags*='mind control'] {/*<--------------------------- Exclude Tags*/
    display: none !important;
    height: 0px;
    margin: 0px !important;
}
`;

    function init() {
        const element = document.querySelectorAll('.resource-tile_info-meta_likes')
        if (element[0]){
            for (var i = 0; i < element.length; i++) {
                const number = parseInt(element[i].innerText)
                // //         window.alert(number)
                if (number <= 250) {//<-----------------------likes limit
                    element[i].parentNode.parentNode.parentNode.parentNode.parentNode.style.display = 'none'
                    element[i].parentNode.parentNode.parentNode.parentNode.parentNode.style.height = '0px'
                    element[i].parentNode.parentNode.parentNode.parentNode.parentNode.style.margin = '0px'
                }
                // setTimeout(init, 5000);
            }
        } else {
            setTimeout(init, 100);
        }
    }
    init();

    history.onpushstate = function(state) {
        setTimeout(init, 200);
    };

    if (typeof GM_addStyle !== "undefined") {
        GM_addStyle(css);
    } else {
        let styleNode = document.createElement("style");
        styleNode.appendChild(document.createTextNode(css));
        (document.querySelector("head") || document.documentElement).appendChild(styleNode);
    }

    (function(history){
        var pushState = history.pushState;
        history.pushState = function(state) {
            if (typeof history.onpushstate == "function") {
                history.onpushstate({state: state});
            }
            // ... whatever else you want to do
            // maybe call onhashchange e.handler
            return pushState.apply(history, arguments);
        };
    })(window.history);
})();