check if stylepath and skin is set (can happen if user didn't get the generated js...
authorGabriel Wicke <gwicke@users.mediawiki.org>
Fri, 25 Jun 2004 22:16:00 +0000 (22:16 +0000)
committerGabriel Wicke <gwicke@users.mediawiki.org>
Fri, 25 Jun 2004 22:16:00 +0000 (22:16 +0000)
stylesheets/wikibits.js

index d297157..fbae991 100644 (file)
@@ -27,14 +27,15 @@ else if (window.attachEvent) window.attachEvent("onload",onloadhook);
 
 
 // document.write special stylesheet links
-if (is_opera_preseven) {
-    document.write('<link rel="stylesheet" type="text/css" href="'+stylepath+'/'+skin+'/Opera6Fixes.css">');
-} else if (is_opera_seven) {
-    document.write('<link rel="stylesheet" type="text/css" href="'+stylepath+'/'+skin+'/Opera7Fixes.css">');
-} else if (is_khtml) {
-    document.write('<link rel="stylesheet" type="text/css" href="'+stylepath+'/'+skin+'/KHTMLFixes.css">');
+if(typeof stylepath != 'undefined' && typeof skin != 'undefined') {
+    if (is_opera_preseven) {
+        document.write('<link rel="stylesheet" type="text/css" href="'+stylepath+'/'+skin+'/Opera6Fixes.css">');
+    } else if (is_opera_seven) {
+        document.write('<link rel="stylesheet" type="text/css" href="'+stylepath+'/'+skin+'/Opera7Fixes.css">');
+    } else if (is_khtml) {
+        document.write('<link rel="stylesheet" type="text/css" href="'+stylepath+'/'+skin+'/KHTMLFixes.css">');
+    }
 }
-
 // Un-trap us from framesets
 if( window.top != window ) window.top.location = window.location;