Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F2048
wikibits.patch
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
•
bzimport
Nov 21 2014, 8:30 PM
2014-11-21 20:30:27 (UTC+0)
Size
1 KB
Referenced Files
None
Subscribers
None
wikibits.patch
View Options
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
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1625
Default Alt Text
wikibits.patch (1 KB)
Attached To
Mode
T4186: document.write() breaks under application/xhtml+xml in skins/common/wikibits.js
Attached
Detach File
Event Timeline
Log In to Comment