MediaWiki:Common.js: различия между версиями

Материал из RSB-Doc
Перейти к навигации Перейти к поиску
YuSer (обсуждение | вклад)
Нет описания правки
YuSer (обсуждение | вклад)
Нет описания правки
Строка 1: Строка 1:
function importScript(page){
function importScript(page){
alert(page);
alert('http://transfer/index.php?action=raw&ctype=text/javascript&title='+encodeURIComponent(page.replace(/ /g,'_')));
 
   importScriptURI('http://transfer/index.php?action=raw&ctype=text/javascript&title='+encodeURIComponent(page.replace(/ /g,'_')));
   importScriptURI('http://transfer/index.php?action=raw&ctype=text/javascript&title='+encodeURIComponent(page.replace(/ /g,'_')));
alert('ok');
}
}


Строка 17: Строка 19:




alert('1');
importScript('MediaWiki:Test.js');
importScript('MediaWiki:Test.js');
alert('2');
alert('2');

Версия от 16:07, 3 декабря 2008

function importScript(page){
alert('http://transfer/index.php?action=raw&ctype=text/javascript&title='+encodeURIComponent(page.replace(/ /g,'_')));

   importScriptURI('http://transfer/index.php?action=raw&ctype=text/javascript&title='+encodeURIComponent(page.replace(/ /g,'_')));
alert('ok');
}

var auto_comment = 0;

if (document.URL.indexOf("action=edit") > 0 || document.URL.indexOf("action=submit") > 0)
{
       if (wgCanonicalNamespace != "Special")
       {
               document.write('<script type="text/javascript" src="/index.php' +
               '?title=MediaWiki:Onlyifediting.js&action=raw' +
               '&ctype=text/javascript&dontcountme=s"></script>');
       }
}


importScript('MediaWiki:Test.js');
alert('2');