Skip to content

Instantly share code, notes, and snippets.

@bdelespierre
Last active March 21, 2021 10:56
Show Gist options
  • Save bdelespierre/1144e7d9862cf13989814ae3fc1efb80 to your computer and use it in GitHub Desktop.
Save bdelespierre/1144e7d9862cf13989814ae3fc1efb80 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name WorkflowyStylableTags
// @description Gives each tag it's own css style, so you can style them with Stylish. I use Blank Canvas to manage my userscripts in Chrome.
// @author Nigel Thorne and LukeMT and bdelespierre
// @include http*://*workflowy.com/*
// @version 1.2
// ==/UserScript==
var customClasses = function(index, old){
return old.split(" ").filter(str => str.match(/-proj$/)).join(" ");
};
setInterval(function(){
$('.project,.pageContainer').removeClass(customClasses);
$('.contentTag').map(function(i, item) {
$(item).parent().parent().parent().addClass(item.innerText.substr(1)+"-proj");
});
},1000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment