Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function injectStyleSheet(cssText) {
- var $style = document.createElement('style');
- var css = document.createTextNode(cssText);
- var container = document.getElementsByTagName('head')[0];
- $style.type = 'text/css';
- if ($style.styleSheet) {
- $style.styleSheet.cssText = css.nodeValue;
- }
- else {
- $style.appendChild(css);
- }
- if (!container) {
- container = document.getElementsByTagName('html')[0];
- }
- container.appendChild($style);
- }
- // workflowyを開いたときだけ
- if (/workflowy\.com/.test(location.host)) {
- // injectStyleSheet("ここにCSSを書き込む");
- injectStyleSheet(".contentUnderline{border-bottom: 2px #0000FF solid;text-decoration:none;}.contentBold{border-bottom:2px #f00 solid;}.contentItalic{background-color:#bf9;text-style:normal;}");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement