Benutzer:DerHexer/vector.js

Us der alemannische Wikipedia, der freie Dialäkt-Enzyklopedy

Hywys: Nôch dyner Änderig muess no der Browser-Cache gleert wärde!
Mozilla/Safari/Konqueror: Strg-Umschalttaste-R (oder Umschalttaste drückt halte und uf’s Neu-Laden-Symbol klicke), IE: Strg-F5, Opera/Firefox: F5

/* function replacecontent() { 

   var req;
   if (req = sajax_init_object()) {
     var text = mw.config.get('wgServer') + mw.config.get('wgScriptPath') + '/api.php?action=query&format=xml&prop=info&titles=$&intoken=edit';
     req.open("GET", text, false);
     req.send("");
 
     var edittoken = req.responseXML.getElementsByTagName('page')[0].getAttribute('edittoken');
   }

     var req3;
     if (req3 = sajax_init_object()) {
       var text = mw.config.get('wgServer') + mw.config.get('wgScriptPath') + '/api.php?action=query&format=xml&list=embeddedin&einamespace=0&eititle=Vorlage:Übersetzungshinweis&eifilterredir=nonredirects&eilimit=1';
       req3.open("GET", text, false);
       req3.send("");
 
       var allpages = req3.responseXML.getElementsByTagName('ei');
     }
 
     for(i=0;i<allpages.length;i++) {
       var thistitle = allpages[i].getAttribute('title');
       thistitle = 'Bremen';
 
       var req5;
       if (req5 = sajax_init_object()) {
         var text = mw.config.get('wgServer') + mw.config.get('wgScriptPath') + '/api.php?action=mobileview&format=xml&sectionprop=&page='+thistitle;
         req5.open("GET", text, false);
         req5.send("");
 
         var allsections = req5.responseXML.getElementsByTagName('section');
         if (allsections) var lastsection = allsections.length-1;
       }
 
       var req4;
       if (req4 = sajax_init_object()) {
         var text = mw.config.get('wgServer') + mw.config.get('wgScriptPath') + '/api.php?action=query&format=xml&prop=revisions&rvprop=content&rvlimit=1&titles='+thistitle+'&rvsection='+lastsection;
         req4.open("GET", text, false);
         req4.send("");
 
         var thisrev = req4.responseXML.getElementsByTagName('rev');
         var thiscontent = thisrev[0];
         if (thiscontent) thiscontent = thiscontent.childNodes[0];
         if (thiscontent) thiscontent = thiscontent.nodeValue;
         if (thiscontent) thisversion = thiscontent.match(/Version\=\d+/);
         if (thisversion) thisversion = thisversion[0].replace(/Version\=/,'');
         if (thiscontent) {
           if (thisversion) {
             thiscontent = thiscontent.replace(/\{\{\Übersetzung.*?\}\}/,'{{Übersetzungshinweis|de|'+thistitle.replace(/\s/g,'_')+'|dütsch|'+thisversion+'}}')
           } else {
             thiscontent = thiscontent.replace(/\{\{\Übersetzung.*?\}\}/,'{{Übersetzungshinweis|de|'+thistitle.replace(/\s/g,'_')+'|dütsch}}')
           }
         }
         if (thiscontent) {
 
           var req2;
           if ((req2 = sajax_init_object())) {
             var text = mw.config.get('wgServer') + mw.config.get('wgScriptPath') + "/api.php?action=edit&title=" + encodeURIComponent(thistitle) + "&text=" + encodeURIComponent(thiscontent) + "&token=" + encodeURIComponent(edittoken) + "&summary=Per https://als.wikipedia.org/wiki/Wikipedia:Umstellig_uf_alemannischi_Stichwerter&minor=&bot=&section="+lastsection;
             //alert(text);
             req2.open("POST", text, true);
             req2.send(text);
           }
         }
       }
     }
 }
 
 if (wgPageName == 'Benutzer:DerHexer/Replace' && wgAction == 'edit') $(replacecontent);
*/