מדיה ויקי:Common.js: הבדלים בין גרסאות בדף
מ מיותר |
מ תיקונים |
||
| שורה 4: | שורה 4: | ||
site = wgServer; | site = wgServer; | ||
} | } | ||
if ( page.indexOf( ":" ) == -1 ) { | if( page.indexOf( ":" ) == -1 ) { | ||
page = "MediaWiki:" + page; | page = "MediaWiki:" + page; | ||
} | } | ||
var url = site + wgScript + "?title=" + encodeURIComponent( page.replace( / /g, "_" ) ) + "&action=raw&ctype=text/javascript&dontcountme=s"; | var url = site + wgScript + "?title=" + encodeURIComponent( page.replace( / /g, "_" ) ) + "&action=raw&ctype=text/javascript&dontcountme=s"; | ||
var scriptElem = document.createElement( | var scriptElem = document.createElement( "script" ); | ||
scriptElem.setAttribute( | scriptElem.setAttribute( "src" , url ); | ||
scriptElem.setAttribute( | scriptElem.setAttribute( "type" , "text/javascript" ); | ||
document.getElementsByTagName( | document.getElementsByTagName( "head" )[0].appendChild( scriptElem ); | ||
} | } | ||