Any ideas? Thanks!
Matt Kruse
--
You received this message because you are subscribed to the Google Groups
"Chromium-extensions" group.
To post to this group, send email to chromium-...@chromium.org.
To unsubscribe from this group, send email to
chromium-extens...@chromium.org.
For more options, visit this group at
http://groups.google.com/a/chromium.org/group/chromium-extensions/?hl=en.
InjectionUtils.addGlobalStyle = function(css) {
try {
var elmHead, elmStyle;
elmHead = document.getElementsByTagName('head')[0];
elmStyle = document.createElement('style');
elmStyle.type = 'text/css';
elmHead.appendChild(elmStyle);
elmStyle.innerHTML = css;
}
catch (e) {
if (!document.styleSheets.length) {
document.createStyleSheet();
}
document.styleSheets[0].cssText += css;
}
};
InjectionUtils.addGlobalStyle('#crx-circle-filter-injection-textfield {border: 1px solid #ccc;background-color: white;}' +'#crx-circle-filter-injection-textfield input {outline: none; border: 0px;}' +'.crx-circle-filter-injection-selected { background-image: -webkit-linear-gradient(top,#4d90fe,#4787ed);}' +'.crx-circle-filter-injection-selected > div { background-color: transparent;}');
You can't count on using the <head> element in a document_start content script. The trick is to use document.documentElement and append your style element to that.
Regards,
- Don