Skip to content

Instantly share code, notes, and snippets.

@Sasquire
Created February 21, 2020 18:44
Show Gist options
  • Save Sasquire/d1da75283da0a44dc7571d014c6dda24 to your computer and use it in GitHub Desktop.
Save Sasquire/d1da75283da0a44dc7571d014c6dda24 to your computer and use it in GitHub Desktop.
title
// ==UserScript==
// @name Highlight blacklist tags
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://e621.net/post/show/*
// @grant none
// ==/UserScript==
const bl_tags = document.cookie
.split(';')
.map(e => e.split('='))
.filter(e => e[0] == ' blacklisted_tags')[0][1]
.split('&')
.map(decodeURIComponent)
.map(e => e.toLowerCase().replace((/_/g), ' '));
Array.from(document.querySelectorAll('#tag-sidebar a')).forEach(node => {
const val = node.innerText;
if(bl_tags.includes(val)){
node.style.setProperty('color', 'lime', 'important');
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment