Search Results

Search found 3 results on 1 pages for 'glassghost'.

Page 1/1 | 1 

  • javascript works with mozilla but not with webkit based browsers

    - by GlassGhost
    Im having problems with a css text variable in this javascript with webkit based browsers(Chrome & Safari) but it works in firefox 3.6 importScript('User:Gerbrant/hidePane.js');//Special thanks to Gerbrant for this wonderful script function addGlobalStyle(css) { var head = document.getElementsByTagName('head')[0]; if (!head) { return; } var style = document.createElement('style'); style.type = 'text/css'; style.rel = 'stylesheet'; style.media = 'screen'; style.href = 'FireFox.css'; style.innerHTML = css; head.appendChild(style); } //The page styling var NewSyleText = "h1, h2, h3, h4, h5 {font-family: 'Verdana','Helvetica',sans-serif; font-style: normal; font-weight:normal;}" + "body, b {background: #fbfbfb; font-style: normal; font-family: 'Cochin','GaramondNo8','Garamond','Big Caslon','Georgia','Times',serif;font-size: 11pt;}" + "p { margin: 0pt; text-indent:1.25em; margin-top: 0.3em; }" + "a { text-decoration: none; color: Navy; background: none;}" + "a:visited { color: #500050;}" + "a:active { color: #faa700;}" + "a:hover { text-decoration: underline;}" + "a.stub { color: #772233;}" + "a.new, #p-personal a.new { color: #ba0000;}" + "a.new:visited, #p-personal a.new:visited { color: #a55858;}" + "a.new, #quickbar a.new { color: #CC2200; }" + /* removes "From Wikipedia, the free encyclopedia" for those of you who actually know what site you are on */ "#siteSub { display: none; }" + /* hides the speaker icon in some articles */ "#spoken-icon .image { display:none;}" + /* KHTMLFix.css */ "#column-content { margin-left: 0; }" + /* Remove contents of the footer, but not the footer itself */ "#f-poweredbyico, #f-copyrightico { display:none;}" + /* Needed to show the star icon in a featured article correctly */ "#featured-star div div { line-height: 10px;}" + /* And the content expands to top and left */ "#content {margin: 0; padding: 0; background:none;}" + "#content div.thumb {border-color:white;}" + /* Hiding the bar under the entry header */ "h1.firstHeading { border-bottom: none;}" + /* Used for US city entries */ "#coordinates { top:1.2em;}"; addGlobalStyle(NewSyleText);//inserts the page styling

    Read the article

  • controlling css with javascript works with mozilla but not with webkit based browsers

    - by GlassGhost
    Im having problems with applying css text variable in this javascript with webkit based browsers(Chrome & Safari) but it works in firefox 3.6 the function: function addGlobalStyle(sCss) { var head = document.getElementsByTagName('head')[0]; if( !head || head == null ) { return false; } var oStyle = document.createElement('style'); oStyle.type = 'text/css'; oStyle.rel = 'stylesheet'; oStyle.media = 'screen'; if ( is_gecko ) { // firefox WORKING !!! oStyle.href = 'FireFox.css'; oStyle.innerHTML = sCss; head.appendChild(oStyle); return true; } else {//nothing but firefox works oStyle.href = 'FireFox.css'; oStyle.innerHTML = sCss; head.appendChild(oStyle); return true; } } the use of the function: var NewSyleText = //The page styling "h1, h2, h3, h4, h5 {font-family: 'Verdana','Helvetica',sans-serif; font-style: normal; font-weight:normal;}" + "body, b {background: #fbfbfb; font-style: normal; font-family: 'Cochin','GaramondNo8','Garamond','Big Caslon','Georgia','Times',serif;font-size: 11pt;}" + "p { margin: 0pt; text-indent:2.5em; margin-top: 0.3em; }" + "a { text-decoration: none; color: Navy; background: none;}" + "a:visited { color: #500050;}" + "a:active { color: #faa700;}" + "a:hover { text-decoration: underline;}"; addGlobalStyle(NewSyleText);//inserts the page styling

    Read the article

1