StackOverflowFilters
StackOverflowFilters copied to clipboard
working very slowly
Thanks for publishing this :)
it works slowly, if put the css content directly, works much faster. But still not clean cus first loads default css and the change is visible in each page.. Any ideas?
(function() {
'use strict';
const style = document.createElement('style');
style.textContent = `css...........`;
document.head.appendChild(style);
document.body.classList.add("theme-custom", "theme-bookface");
})();
Add @run-at document-start to the header. Also I assume you are only adding the custom theme CSS to your script, and not the entire document? That would be only the rules starting with body.theme-custom.theme-bookface.
Pulling a document from archive.org was certainly the easiest way to do this as a userscript, but nowhere near the best.