https://bugs.kde.org/show_bug.cgi?id=453524
Bug ID: 453524 Summary: UserStyle manager Product: Falkon Version: unspecified Platform: unspecified OS: Unspecified Status: REPORTED Severity: minor Priority: NOR Component: extensions Assignee: now...@gmail.com Reporter: genghisk...@gmx.ca Target Milestone: --- Please add to Greasemonkey extension ability to manage UserStyles https://userbase.kde.org/Falkon#User_Style Extension that is both Userscript and userstyle manager https://addons.mozilla.org/en-US/firefox/addon/firemonkey/ Objective The code requires to manipulate CSS with a UserStyle is shorter, cleaner and easier to read. Here are a couple of (complex) ways to handle CSS with UserScript First: function addGlobalStyle(css) { var head, style; head = document.getElementsByTagName('head')[0]; if (!head) { return; } style = document.createElement('style'); style.type = 'text/css'; style.innerHTML = css; head.appendChild(style); } We send to this function a one-line stylesheet (not readable) or a multiple lined stylesheet which has the sign \ at end of each line (hardens on cut and paste). Second: function hide(property) { const div = document.querySelector(property); div.style.display = "none" } switch (window.location.hostname) { case 'unix.stackexchange.com': case 'stackoverflow.com': hide('div.js-consent-banner'); break; } The second way, even when has more code, should work on any render engine which makes it even more powerful than a UserStyle. Still, I find a UserStyle manager a useful extension nonetheless. As written above, the code requires to manipulate CSS with a UserStyle is shorter, cleaner and easier to read. -- You are receiving this mail because: You are watching all bug changes.