f95zone tweaks

f95zone exclude tags and min like filter

Tính đến 01-12-2020. Xem phiên bản mới nhất.

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

Bạn sẽ cần cài đặt một tiện ích mở rộng như Tampermonkey hoặc Violentmonkey để cài đặt kịch bản này.

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.

(Tôi đã có Trình quản lý tập lệnh người dùng, hãy cài đặt nó!)

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);
})();