您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Auto hide some tags you don't like to see
当前为
- // ==UserScript==
- // @name ao3 hide some tags
- // @description Auto hide some tags you don't like to see
- // @namespace ao3
- // @include http*://archiveofourown.org/*
- // @grant unsafeWindow
- // @version 1
- // ==/UserScript==
- (function($) {
- /**** CONFIG ********************/
- var tagsToHide = ["camel spiders", "flukeworms", "ticks"];
- var buttonLabel = "~";
- /********************************/
- $('.blurb ul.tags, .meta .tags ul').each(function() {
- var $list = $(this);
- $list.find('a.tag').each(function() {
- var $tag = $(this);
- var text = $tag.text();
- for (var i = 0, len = tagsToHide.length; i < len; i++) {
- if (text.toLowerCase() == tagsToHide[i].toLowerCase()) {
- hideTagsList($list);
- return false;
- }
- }
- });
- });
- function hideTagsList($list) {
- $list.hide();
- $('<button>').addClass('hide-some-tags-userscript').text(buttonLabel).click(function() {
- $(this).next('ul').toggle();
- }).insertBefore($list);
- }
- })(unsafeWindow.jQuery);