您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
f95zone exclude tags and min like filter
当前为
// ==UserScript== // @name f95zone tweaks // @namespace f95zone tweaks // @version 0.4.3 // @description f95zone exclude tags and min like filter // @author 3xd_tango // @match https://f95zone.to/latest/ // @require https://cdn.jsdelivr.net/combine/npm/@violentmonkey/dom@1,npm/@violentmonkey/[email protected] // @grant GM_addStyle // ==/UserScript== let dislikes = ['female protagonist','text based','mind control']; let likes = [['incest','#ff0000'],['harem','#0011ff']]; let like_limit = 200;//<-----------------------likes limit (function() { 'use strict'; var css = '' // for (var i = 0; i < dislikes.length; i++) { // css += `div[data-tags*='${dislikes[i]}']${i < dislikes.length -1 ? ',': ''}` // } css += `.customTags{border-radius:2px;box-shadow:0 0 0 0 transparent,0 1px 1px 0 rgba(0,0,0,.15),0 1px 2px 0 rgba(0,0,0,.15);display:inline-block;font-size:.8em;line-height:1.8em;margin:4px 4px 0 0;padding:0 6px;text-shadow:1px 1px 2px rgba(0,0,0,.75)}` document.body.append(VM.createElement("style", null, css)); function init() { const element = document.querySelectorAll('.resource-tile') if (element[0]) { checki: for (var i = 0; i < element.length; i++) { if (element[i].style.display == 'none') { continue } var node = document.createElement("DIV"); const dataTags = element[i].dataset.tags.split(',') const isFP = checkTags(element[i],dataTags) node.style.padding = '.5rem 0' const element_likes = element[i].childNodes[0].childNodes[1].childNodes[1].childNodes[1].childNodes[1].innerHTML; var element_new_tag = element[i].childNodes[0].childNodes[1].childNodes[1]; var isDisplay = false for (var j = likes.length - 1; j >= 0; j--) { if (dataTags.includes(likes[j][0])) { var node1 = document.createElement("SPAN"); node1.classList.add('customTags'); node1.style.backgroundColor = likes[j][1] element[i].style.boxShadow = `0px 0px 10px 1px ${likes[j][1]}` node1.appendChild(document.createTextNode(likes[j][0])) node.appendChild(node1) isDisplay = true } } if (isFP) { element[i].style.setProperty("display", "block", "important") element[i].style.setProperty("height", "unset", "important") element[i].style.setProperty("margin", "unset", "important") }else { element[i].style.setProperty("display", "none", "important") element[i].style.setProperty("height", "0px", "important") element[i].style.setProperty("margin", "0px", "important") } if (element_likes <= like_limit) { if (isDisplay == false) { element[i].style.setProperty("display", "none", "important") element[i].style.setProperty("height", "0px", "important") element[i].style.setProperty("margin", "0px", "important") } } if (element[i].style.display != 'none') { element_new_tag.appendChild(node) } } } else { setTimeout(init, 100); } } init(); // var value = VM.getTextValues(document.querySelectorAll('#first_name2')) // console.log(value) history.onpushstate = function(state) { setTimeout(init, 200); }; (function(history) { var pushState = history.pushState; history.pushState = function(state) { if (typeof history.onpushstate == "function") { history.onpushstate({ state: state }); } return pushState.apply(history, arguments); }; })(window.history); })(); function checkTags(element, dataTags) { let tagProt = ['female protagonist', 'male protagonist', 'futa/trans protagonist']; const tagProtNames = dislikes.filter(e => e.includes('protagonist')); let b = []; let c = 0; dataTags.forEach((e, index) => { if (tagProtNames.length >= 1) { if (tagProtNames.includes(e)) { b.push(e) return } } if (dislikes.includes(e)) { c += 1 return } }) if (c > 0) { return false } if (b.length > 0) { b.forEach(e => { tagProt = tagProt.filter(r => r != e) }) for (var i = tagProt.length - 1; i >= 0; i--) { if (dataTags.includes(tagProt[i])) { return true } } } return true }