Greasy Fork

FIMFiction - hide anthro & EqG.

Hide stories that have tags "Anthro" or "Equestria Girls"

当前为 2017-10-12 提交的版本,查看 最新版本

// ==UserScript==
// @name        FIMFiction - hide anthro & EqG.
// @description  Hide stories that have tags "Anthro" or "Equestria Girls"
// @namespace   anonymous
// @include     http*://*.fimfiction.net/*
// @version     0.1
// @grant       none
// ==/UserScript==

var blocked = ["anthro", "equestria_girls"];

function hide(stories) {
	for(var i = 0; i < stories.length; i++)
	{
		var tags = stories[i].querySelectorAll('.story-tags > li > a');
		for(var n = 0; n < tags.length; n++)
		{
			blocked.forEach(function(blockedtag) {
				if (tags[n].dataset.tag == blockedtag) {
					stories[i].style.display = 'none';
				}
			});
		}
	
	}
}

var storycards = document.getElementsByClassName('story-card-container');
hide(storycards);
var stories = document.getElementsByClassName('story_container');
hide(stories);