Page MenuHomePhabricator

wikibits.patch

Authored By
bzimport
Nov 21 2014, 8:30 PM
Size
1 KB
Referenced Files
None
Subscribers
None

wikibits.patch

Index: skins/common/wikibits.js
===================================================================
--- skins/common/wikibits.js (revision 36299)
+++ skins/common/wikibits.js (working copy)
@@ -86,14 +86,23 @@
return s;
}
-// document.write special stylesheet links
+function appendLinkedCss(uri) {
+ var l = document.createElement('link');
+ s.rel = 'stylesheet';
+ s.type = 'text/css';
+ s.href = uri;
+ document.getElementsByTagName('head')[0].appendChild(l);
+ return l;
+}
+
+// appendLinkedCss special stylesheet links
if (typeof stylepath != 'undefined' && typeof skin != 'undefined') {
if (is_opera_preseven) {
- document.write('<link rel="stylesheet" type="text/css" href="'+stylepath+'/'+skin+'/Opera6Fixes.css">');
+ appendLinkedCss( stylepath + '/' + skin + '/Opera6Fixes.css' );
} else if (is_opera_seven && !is_opera_95) {
- document.write('<link rel="stylesheet" type="text/css" href="'+stylepath+'/'+skin+'/Opera7Fixes.css">');
+ appendLinkedCss( stylepath + '/' + skin + '/Opera7Fixes.css' );
} else if (is_khtml) {
- document.write('<link rel="stylesheet" type="text/css" href="'+stylepath+'/'+skin+'/KHTMLFixes.css">');
+ appendLinkedCss( stylepath + '/' + skin + '/KHTMLFixes.css' );
}
}

File Metadata

Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1625
Default Alt Text
wikibits.patch (1 KB)

Event Timeline