I have the same problem. GM_addStyle() is crucial. Use these workarounds
which found from stackoverflow:
function GM_addStyle_from_file(fileName) {
var head = document.head
, link = document.createElement("link")
link.type = "text/css"
link.rel = "stylesheet"
link.href = fileName
head.appendChild(link)
}
function GM_addStyle_from_string(str) {
var node = document.createElement('style');
node.innerHTML = str;
document.body.appendChild(node);
}
Example usage:
GM_addStyle_from_file(
"https://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery.ui.base.css"
);
GM_addStyle_from_string (
".embeddedImgContainer {" +
"background: "+imgContainerBackgroundColor+";" +
"}" +
".embeddedImgAnchor {"+
"display: inline-block;"+
"}"
)
--
You received this message because you are subscribed to the Google Groups
"greasemonkey-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/greasemonkey-users.
For more options, visit https://groups.google.com/d/optout.