Instantly share code, notes, and snippets.

Embed
What would you like to do?
FlatFlowy Bookmarklet for WorkFlowy
//v2.3 FlatFlowy
(function flatFlowy(hideNotes) {
function toastMsg(str, ms, err) {
WF.showMessage("<b>" + str + "</b>", err);
var t = ms ? ms : 2000;
setTimeout(function () { WF.hideMessage() }, t);
}
var hNotes = hideNotes ? ",.page.searching .project .notes" : "";
var css = ".page.searching .project .name" + hNotes + "{display:none!important}.page.searching .project.matches .name.matches{display:block!important}.page.searching .selected>.children>.project .project{margin:0 0 4px!important}.page.searching .children{margin:0!important;padding:0!important;border:0!important}.page.searching .childrenEnd{height:0!important}";
var h = "data:text/css;charset=UTF-8," + encodeURIComponent(css);
var s = document.styleSheets;
for (i = 0, max = s.length; i < max; i++) {
if (s[i].href == h) {
var d = !s[i].disabled ? true : false;
var state = !s[i].disabled ? "OFF" : "ON";
if (!WF.currentSearchQuery()) { toastMsg("Flatflowy: " + state) };
return void (s.item(i).disabled = d);
}
}
var a = document.createElement("link");
a.rel = "stylesheet";
a.href = h;
document.getElementsByTagName("head")[0].appendChild(a);
if (!WF.currentSearchQuery()) {
toastMsg("Flatflowy: ON");
}
})();
@rawbytz

This comment has been minimized.

Owner

rawbytz commented Jan 7, 2018

Go here for install links.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment