The My Opera forums have been replaced with forums.opera.com. Please head over there to discuss Opera's products and features
See the new ForumsYou need to be logged in to post in the forums. If you do not have an account, please sign up first.
Help converting greasemonkey userjs to opera userjs
Google Reader now looks like crap, too much whitespace everywhere. Some guy fixed it with a Firefox Greasemonkey script here (click Source):http://userscripts.org/scripts/show/116850
How can this be adapted for use with Opera? I'm not JS savvy enough to figure it out, thanks.
Originally posted by larskl:
just copy the styles and use it as a usercss
Agreed. That said, you could also add the following to the file:
function GM_addStyle(css) {
var parent = document.getElementsByTagName("head")[0];
if (!parent) {
parent = document.documentElement;
}
var style = document.createElement("style");
style.type = "text/css";
var textNode = document.createTextNode(css);
style.appendChild(textNode);
parent.appendChild(style);
}
(quickly grabbed from here)
The DnD Sanctuary — a safety net for My Opera's demise.
Originally posted by rseiler:
I'm not really following the last post: what is that intended to do?
It's a custom implementation of GM's native GM_addStyle function. (It writes the css into a TextNode, which itself is inserted into a style element, that is appended to head or documentElement.)
(And all that should eventually be wrapped up by an anonymous function.)
Never argue with an idiot. They drag you down to their level, then beat you with experience. «« « ‹‹ ‹