Benutzer:WWWIG/monobook.js: Unterschied zwischen den Versionen

Aus Watch-Wiki
Zur Navigation springen Zur Suche springen
(+ kat)
 
(81 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 2: Zeile 2:
 
// my_vkdebug = true;
 
// my_vkdebug = true;
  
addOnloadHook( function () {
+
importScript('MediaWiki:Gadget-CheckRCForm.js');
LoadTemCatGenForm();
+
importScript('MediaWiki:Gadget-CatGenRepairForm.js');
 +
 
 +
if ( wgAction=="edit" &&
 +
  ( wgNamespaceNumber==0 || wgNamespaceNumber==10 ) )
 +
addOnloadHook(function() {
 +
 +
  if ( t_Position = document.getElementById( 'firstHeading' ) ) {
 +
 +
      var t_NewElement = document.createElement('input');
 +
      t_NewElement.setAttribute( 'id', 'mw-new-element' );
 +
      t_NewElement.setAttribute( 'type', 'button' );
 +
      t_NewElement.setAttribute( 'onclick', 'do_new_action();' );
 +
 +
      t_Position.insertBefore( t_NewElement, t_Position.firstChild );
 +
      t_Position.insertBefore( document.createTextNode( ' ' ), t_Position.firstChild );
 +
  }
 
});
 
});
  
var t_wikiurl = wgServer + wgScriptPath + '/api.php';
+
function do_new_action() {
var t_Files = new Array();
+
  if ( !document.getElementById( 'wpTextbox1' ) ) return;
var t_FilestoCheck = new Array();
+
  var t_Inhalt = document.getElementById( 'wpTextbox1' ).value;
 
+
  var t_Template = '';
var t_FilesChecked = new Array();
+
  var t_Sprache = '';
var t_processnext = 0;
+
  if ( t_Inhalt.indexOf('{{Andere Sprachen|') != -1 ) {
var t_restartintervall = 120*1000;
+
      t_Template = 'Andere Sprachen';
 
+
      t_Sprache = 'de';
 
+
  } else
t_blackwordlist = new Array(
+
  if ( t_Inhalt.indexOf('{{andere Sprachen|') != -1 ) {
'comment',
+
      t_Template = 'andere Sprachen';
'porn',
+
      t_Sprache = 'de';
'angel',
+
  } else
'fire',
+
  if ( t_Inhalt.indexOf('{{другие языки|') != -1 ) {
'sex',
+
      t_Template = 'другие языки';
'animal',
+
      t_Sprache = 'ru';
'movies',
+
  } else
'film',
+
  if ( t_Inhalt.indexOf('{{Andere talen|') != -1 ) {
'gift',
+
      t_Template = 'Andere talen';
'free',
+
      t_Sprache = 'nl';
'self',
+
  } else
'young',
+
  if ( t_Inhalt.indexOf('{{andere talen|') != -1 ) {
'donna',
+
      t_Template = 'andere talen';
'teens',
+
      t_Sprache = 'nl';
'girls',
+
  } else
'craig',
+
  if ( t_Inhalt.indexOf('{{Other languages|') != -1 ) {
'generic',
+
      t_Template = 'Other languages';
'extend',
+
      t_Sprache = 'en';
'discount',
+
  } else
'pills',
+
  if ( t_Inhalt.indexOf('{{other languages|') != -1 ) {
'insurance',
+
      t_Template = 'other languages';
'life',
+
      t_Sprache = 'en';
'valium',
+
  } else
'robaxin',
+
  if ( t_Inhalt.indexOf('{{Andere Sprachen|') != -1 ) {
'vimax',
+
      t_Template = 'Andere Sprachen';
'xtreme',
+
      t_Sprache = '';
'bodybuilding',
+
  } else {
'tits',
+
      alert( 'Vorlage nicht gefunden!' );
'total',
+
      return;
'gym',
+
  }
'reverse',
 
'number',
 
'asses',
 
'big',
 
'Exte');
 
 
 
function LoadTemCatGenForm() {
 
 
 
if ( document.getElementById( 'InsertcheckRCForm' ) ) {
 
out = '<form method="get" style="width:100%" name="TemCatGenForm">' +
 
'<fieldset><legend>Recentchanges</legend>' +
 
'<div style="margin-top:.5em; margin-left:1em; margin-right:1em;">' +
 
'<p><input type="button" value="Hole RC" ' +
 
'title="" onClick="CheckRC()">&nbsp;' +
 
'</p>' +
 
'<label for="Status" style="vertical-align:top;">Status:</label>' +
 
'<p id="Status" style="border: 1px solid #aaa; padding:.5em;" > ...</p>' +
 
'<div id="PreviewForm"></div>' +
 
'<div id="InsertRCForm"></div>' +
 
'</div></fieldset></form>';
 
 
 
document.getElementById( 'InsertcheckRCForm' ).innerHTML = out;
 
}
 
}
 
 
 
function CheckRC() {
 
 
 
window.setTimeout( "CheckRC()", t_restartintervall );
 
 
 
var t_parameters = '?action=query&format=json&list=recentchanges&rclimit=50&rctype=new&rcprop=user|comment|flags|timestamp|title|ids|sizes';
 
var t_http_req = null;
 
if (window.XMLHttpRequest) {t_http_req = new XMLHttpRequest();}
 
else if (window.ActiveXObject) {t_http_req = new ActiveXObject("Microsoft.XMLHTTP");}
 
t_http_req.open("GET", t_wikiurl + t_parameters, true);
 
t_http_req.onreadystatechange = function() {
 
if(t_http_req.readyState != 4) {
 
document.getElementById( 'Status' ).innerHTML = 'RC-Liste wird angefordert ('+GetTimeStamp()+') ...';
 
}
 
if(t_http_req.readyState == 4 && t_http_req.status == 200) {
 
document.getElementById( 'Status' ).innerHTML = 'RC-Liste erhalten ('+GetTimeStamp()+') ...';
 
GotRC( eval("(" + t_http_req.responseText + ")"), t_http_req.responseText );
 
}
 
}
 
t_http_req.send(null);
 
}
 
 
 
function GotRC( queryData, rawData ) {
 
 
 
t_Files.splice( 0, t_Files.length );
 
t_FilestoCheck.splice( 0, t_FilestoCheck.length );
 
t_processnext = 0;
 
 
 
if ( queryData.query && queryData.query.recentchanges ) {
 
for ( t_Change = 0; t_Change < queryData.query.recentchanges.length; t_Change++ ) {
 
if ( typeof queryData.query.recentchanges[t_Change].anon != 'undefined' ) {
 
if ( CheckBadWord( queryData.query.recentchanges[t_Change].comment ) ) {
 
var t_File = new Array( queryData.query.recentchanges[t_Change].title,
 
queryData.query.recentchanges[t_Change].revid,
 
queryData.query.recentchanges[t_Change].user,
 
queryData.query.recentchanges[t_Change].comment );
 
t_Files.push( t_File );
 
} else {
 
var t_File = new Array( queryData.query.recentchanges[t_Change].title,
 
queryData.query.recentchanges[t_Change].revid,
 
queryData.query.recentchanges[t_Change].user,
 
queryData.query.recentchanges[t_Change].comment );
 
t_FilestoCheck.push( t_File );
 
}
 
 
} else {
 
}
 
}
 
}
 
 
 
if ( t_Files.length == 0 && t_FilestoCheck.length == 0 ) {
 
document.getElementById( 'Status' ).innerHTML = 'Prüfung durchgeführt ('+GetTimeStamp()+')<hr style="margin-top:1em;"><ul>';
 
} else {
 
if ( t_FilestoCheck.length == 0 ) {
 
document.getElementById( 'InsertRCForm' ).innerHTML = '<hr style="margin-top:1em;"><ul>';
 
CheckTitles();
 
} else {
 
PreCheckTitles();
 
}
 
}
 
}
 
 
 
function PreCheckTitles() {
 
 
 
if ( t_processnext < t_FilestoCheck.length ) {
 
 
t_FilesToCheckString = '';
 
 
for ( t_FiletoCheck = 0; t_FiletoCheck < t_FilestoCheck.length; t_FiletoCheck++ ) {
 
if ( t_FilesToCheckString != '' ) {
 
t_FilesToCheckString += '|';
 
}
 
t_FilesToCheckString += t_FilestoCheck.splice( 0, 1 );
 
}
 
 
var t_parameters = '?action=query&format=json&prop=info|revisions&ids|timestamp|user|comment|content&titles=' +
 
encodeURIComponent( t_FilesToCheckString ) + '';
 
var t_http_req = null;
 
if (window.XMLHttpRequest) {t_http_req = new XMLHttpRequest();}
 
else if (window.ActiveXObject) {t_http_req = new ActiveXObject("Microsoft.XMLHTTP");}
 
t_http_req.open("GET", CatGenForm.t_wikiurl + t_parameters, true);
 
t_http_req.onreadystatechange = function() {
 
if(t_http_req.readyState != 4) {
 
document.getElementById( 'Status' ).innerHTML += '<br>' + 'Datei-Inhalt wird angefordert ('+GetTimeStamp()+') ...';
 
}
 
if(t_http_req.readyState == 4 && t_http_req.status == 200) {
 
document.getElementById( 'Status' ).innerHTML += '<br>' + 'Datei-Inhalt erhalten ('+GetTimeStamp()+') ...';
 
PreCheckTitlesProcess( eval("(" + t_http_req.responseText + ")"), t_http_req.responseText );
 
}
 
}
 
t_http_req.send(null);
 
}
 
}
 
 
 
function PreCheckTitlesProcess( queryData, rawData ) {
 
 
 
document.getElementById( 'Status' ).innerHTML += '<br>' + rawData;
 
 
 
if ( queryData.query && queryData.query.pages ) {
 
for ( var t_Page in queryData.query.pages ) {
 
if ( queryData.query.pages[t_Page].pageid ) {
 
if ( queryData.query.normalized ) {
 
for ( t_PageNorm= 0; t_PageNorm < queryData.query.normalized.length; t_PageNorm++ ) {
 
if ( queryData.query.normalized[t_PageNorm].to == queryData.query.pages[t_Page].title ) {
 
if ( queryData.query.pages[t_Page].revisions ) {
 
if ( CheckBadWord( queryData.query.pages[t_Page].revisions[0]['*'] ) ) {
 
var t_File = new Array( queryData.query.pages[t_Page].title,
 
queryData.query.pages[t_Page].revisions[0].revid,
 
queryData.query.pages[t_Page].revisions[0].user,
 
queryData.query.pages[t_Page].revisions[0]['*'] );
 
t_Files.push( t_File );
 
}
 
}
 
}
 
}
 
} else
 
if ( queryData.query.pages[t_Page].revisions ) {
 
document.getElementById( 'Status' ).innerHTML += '<br>' + 'Prüfe Datei-Inhalt ('+GetTimeStamp()+')<br>' + queryData.query.pages[t_Page].revisions[0]['*'];
 
if ( CheckBadWord( queryData.query.pages[t_Page].revisions[0]['*'] ) ) {
 
var t_File = new Array( queryData.query.pages[t_Page].title,
 
queryData.query.pages[t_Page].revisions[0].revid,
 
queryData.query.pages[t_Page].revisions[0].user,
 
queryData.query.pages[t_Page].revisions[0]['*'] );
 
t_Files.push( t_File );
 
}
 
}
 
}
 
}
 
}
 
 
 
if ( t_Files.length == 0 ) {
 
document.getElementById( 'Status' ).innerHTML += '<br>' + 'Prüfung durchgeführt ('+GetTimeStamp()+')<hr style="margin-top:1em;"><ul>';
 
} else {
 
document.getElementById( 'InsertRCForm' ).innerHTML = '<hr style="margin-top:1em;"><ul>';
 
CheckTitles();
 
}
 
}
 
 
 
function CheckTitles() {
 
 
 
if ( t_processnext < t_Files.length ) {
 
 
 
document.getElementById( 'InsertRCForm' ).innerHTML += '<li>' + t_Files[t_processnext][0]+'<br>'+t_Files[t_processnext][1]+'<br>'+t_Files[t_processnext][2]+'<br>'+t_Files[t_processnext][3] + '</li>';
 
 
 
var t_parameters = '?action=query&format=json&prop=info|revisions&intoken=delete&titles=' +
 
encodeURIComponent( t_Files[t_processnext][0] ) + '';
 
var t_http_req = null;
 
if (window.XMLHttpRequest) {t_http_req = new XMLHttpRequest();}
 
else if (window.ActiveXObject) {t_http_req = new ActiveXObject("Microsoft.XMLHTTP");}
 
t_http_req.open("GET", CatGenForm.t_wikiurl + t_parameters, true);
 
t_http_req.onreadystatechange = function() {
 
if(t_http_req.readyState != 4) {
 
document.getElementById( 'Status' ).innerHTML += '<br>' + 'Datei-Token wird angefordert ('+GetTimeStamp()+') ...';
 
}
 
if(t_http_req.readyState == 4 && t_http_req.status == 200) {
 
DeleteTitles( eval("(" + t_http_req.responseText + ")"), t_http_req.responseText );
 
}
 
}
 
t_http_req.send(null);
 
}
 
}
 
 
 
function DeleteTitles ( queryData, rawData ) {
 
 
 
if ( queryData ) {
 
if ( queryData.query && queryData.query.pages ) {
 
var t_token = "";
 
var t_timestamp = "";
 
var t_some_pages = queryData.query.pages;
 
for ( var t_Page in t_some_pages ) {
 
if ( t_some_pages[t_Page].edittoken ) {
 
t_token = encodeURIComponent( t_some_pages[t_Page].edittoken );
 
} else
 
if ( t_some_pages[t_Page].deletetoken ) {
 
t_token = encodeURIComponent( t_some_pages[t_Page].deletetoken );
 
}
 
if ( t_some_pages[t_Page].revisions ) {
 
var t_some_revisions = t_some_pages[t_Page].revisions;
 
for ( var i = 0; i < t_some_revisions.length; i++ ) {
 
if (t_some_revisions[i].timestamp) {
 
t_timestamp = t_some_revisions[i].timestamp;
 
}
 
}
 
}
 
document.getElementById( 'Status' ).innerHTML += '<br>' + t_some_pages[t_Page].starttimestamp;
 
}
 
 
 
t_summary = '&reason=' + encodeURIComponent( 'automatisch gelöscht' );
 
 
 
var t_parameters = '?action=delete&format=json&title=' + encodeURIComponent( t_some_pages[t_Page].title ) +
 
  t_summary + '&watch&basetimestamp=' + t_timestamp +
 
  '&token=' + t_token + '&bot=1';
 
 
 
var t_http_req = null;
 
if (window.XMLHttpRequest) {t_http_req = new XMLHttpRequest();}
 
else if (window.ActiveXObject) {t_http_req = new ActiveXObject("Microsoft.XMLHTTP");}
 
t_http_req.open("POST", CatGenForm.t_wikiurl + t_parameters, true);
 
t_http_req.onreadystatechange = function() {
 
if( t_http_req.readyState != 4 ) {
 
document.getElementById( 'Status' ).innerHTML +=
 
'<br>' + '<small>'+t_some_pages[t_Page].title+'</small><br>wird gelöscht ('+GetTimeStamp()+') ...';
 
}
 
if( t_http_req.readyState == 4 && t_http_req.status == 200 ) {
 
DeleteTitlesProcessed( eval("(" + t_http_req.responseText + ")" ), t_http_req.responseText );
 
}
 
}
 
t_http_req.send(null);
 
}
 
}
 
}
 
 
 
function CheckUsers() {
 
 
 
if ( t_processnext < t_Files.length ) {
 
var t_parameters = '?action=block&format=json&user=' +
 
encodeURIComponent( t_Files[t_processnext][2] ) + '&gettoken';
 
var t_http_req = null;
 
if (window.XMLHttpRequest) {t_http_req = new XMLHttpRequest();}
 
else if (window.ActiveXObject) {t_http_req = new ActiveXObject("Microsoft.XMLHTTP");}
 
t_http_req.open("POST", CatGenForm.t_wikiurl + t_parameters, true);
 
t_http_req.onreadystatechange = function() {
 
if(t_http_req.readyState != 4) {
 
document.getElementById( 'Status' ).innerHTML += '<br>' + 'Benutzer-Token wird angefordert ('+GetTimeStamp()+') ...';
 
}
 
if(t_http_req.readyState == 4 && t_http_req.status == 200) {
 
BlockUsers( eval("(" + t_http_req.responseText + ")"), t_http_req.responseText );
 
}
 
}
 
t_http_req.send(null);
 
}
 
}
 
 
 
function BlockUsers ( queryData, rawData  ) {
 
 
 
document.getElementById( 'Status' ).innerHTML += '<br>' + rawData;
 
 
 
if ( queryData ) {
 
if ( queryData.block && queryData.block.blocktoken ) {
 
var t_token = queryData.block.blocktoken;
 
  
var t_parameters = '?action=block&format=json&user=' +
+
  if ( ( t_PositionStart = t_Inhalt.indexOf( '{{'+t_Template+'|' ) ) != -1 ) {
encodeURIComponent( t_Files[t_processnext][2] ) + '&reason=' +  
+
      t_PositionEnd = t_Inhalt.indexOf('}}', t_PositionStart );
encodeURIComponent( 'spam (automatisch gesperrt)' )  + '&token=' +
+
      var t_Andere_Sprachen = t_Inhalt.slice( t_PositionStart, t_PositionEnd + 2 );
encodeURIComponent( t_token );
 
var t_http_req = null;
 
if (window.XMLHttpRequest) {t_http_req = new XMLHttpRequest();}
 
else if (window.ActiveXObject) {t_http_req = new ActiveXObject("Microsoft.XMLHTTP");}
 
t_http_req.open("POST", CatGenForm.t_wikiurl + t_parameters, true);
 
t_http_req.onreadystatechange = function() {
 
if(t_http_req.readyState != 4) {
 
document.getElementById( 'Status' ).innerHTML += '<br>' + 'Benutzer wird gesperrt ('+GetTimeStamp()+') ...';
 
}
 
if(t_http_req.readyState == 4 && t_http_req.status == 200) {
 
DeleteTitlesProcessed( eval("(" + t_http_req.responseText + ")"), t_http_req.responseText );
 
}
 
}
 
t_http_req.send(null);
 
}
 
}
 
}
 
  
function DeleteTitlesProcessed( queryData, rawData ) {
+
      // alert( 't_Andere_Sprachen' + t_Andere_Sprachen );
  
if ( queryData['delete'] ) {
+
      t_Inhalt = t_Inhalt.replace( t_Andere_Sprachen + '\r\n', '' );
if ( queryData['delete'].title && queryData['delete'].reason ) {
+
      t_Inhalt = t_Inhalt.replace( t_Andere_Sprachen + '\r', '' );
document.getElementById( 'Status' ).innerHTML += '<br>' + queryData['delete'].title + '<br>' + queryData['delete'].reason;
+
      t_Inhalt = t_Inhalt.replace( t_Andere_Sprachen + '\n', '' );
t_processnext++;
+
      t_Inhalt = t_Inhalt.replace( t_Andere_Sprachen, '' );
if ( t_processnext < t_Files.length ) {
 
CheckTitles();
 
} else {
 
t_processnext = 0;
 
CheckUsers();
 
}
 
}
 
}  else
 
if ( queryData['block'] && queryData['block'].user ) {
 
document.getElementById( 'Status' ).innerHTML += '<br>' + queryData['block'].user + ' wurde gesperrt ('+GetTimeStamp()+') ';
 
t_processnext++;
 
if ( t_processnext < t_Files.length ) {
 
CheckUsers();
 
}
 
} else {
 
document.getElementById( 'Status' ).innerHTML += '<br>Unbekannter Fehler ' + rawData +  '<br>('+GetTimeStamp()+')';
 
}
 
if ( t_processnext >= t_Files.length ) {
 
document.getElementById( 'InsertRCForm' ).innerHTML += '</ul>';
 
document.getElementById( 'Status' ).innerHTML = 'Prüfung durchgeführt ('+GetTimeStamp()+')<hr style="margin-top:1em;"><ul>';
 
}
 
}
 
  
function GetTimeStamp() {
+
      t_Andere_Sprachen = t_Andere_Sprachen.replace( '}}', '' );
 +
      var t_Interwikis = t_Andere_Sprachen.split("|[[");
 +
      var t_InterwikiAusgabe = '';
  
var t_now = new Date();
+
      for ( var i = 1; i < t_Interwikis.length; i++ ) {
+
          t_Interwikis[i] = t_Interwikis[i].replace( ']]', '' );
t_GetTimeStamp = ('0000'+t_now.getUTCFullYear()).substr(String(t_now.getUTCFullYear()).length,4)+'-'+('00'+(t_now.getUTCMonth()+1)).substr(String((t_now.getUTCMonth()+1)).length,2)+'-'+('00'+t_now.getUTCDate()).substr(String(t_now.getUTCDate()).length,2)+'T'+
+
          var t_Interwiki = t_Interwikis[i].split("|");
('00'+t_now.getUTCHours()).substr(String(t_now.getUTCHours()).length,2)+':'+('00'+t_now.getUTCMinutes()).substr(String(t_now.getUTCMinutes()).length,2)+':'+('00'+t_now.getUTCSeconds()).substr(String(t_now.getUTCSeconds()).length,2)+'Z';
+
          if ( t_Interwiki[1] && ( t_Interwiki[1] != t_Sprache || t_Interwiki[0] != wgTitle ) ) {
+
            t_InterwikiAusgabe += '[[' + t_Interwiki[1] + ':' + t_Interwiki[0] + ']]\r\n';
return t_GetTimeStamp;
+
          }
}
+
      }
 +
      t_Inhalt += t_InterwikiAusgabe;
 +
 
 +
      // alert( 'Go' + t_InterwikiAusgabe );
  
function CheckBadWord( t_text ) {
+
      document.getElementById( 'wpTextbox1' ).value = t_Inhalt;
  
if ( t_text ) {
+
      document.editform.wpSummary.value = 'Vorlage '+t_Template+' in Interwikis getauscht';
for ( t_Word = 0; t_Word < t_blackwordlist.length; t_Word++ ) {
+
      document.editform.wpMinoredit.checked = true;
if ( String( t_text.toUpperCase() ).indexOf( String( t_blackwordlist[t_Word]).toUpperCase() ) != -1 ) return true;
+
      document.editform.submit();
}
+
  }
return false;
 
}
 
 
}
 
}

Aktuelle Version vom 17. August 2011, 06:54 Uhr

/* -- */
// my_vkdebug = true;

importScript('MediaWiki:Gadget-CheckRCForm.js');
importScript('MediaWiki:Gadget-CatGenRepairForm.js');

if ( wgAction=="edit" &&
   ( wgNamespaceNumber==0 || wgNamespaceNumber==10 ) )
addOnloadHook(function() {
 
   if ( t_Position = document.getElementById( 'firstHeading' ) ) {
 
      var t_NewElement = document.createElement('input');
      t_NewElement.setAttribute( 'id', 'mw-new-element' );
      t_NewElement.setAttribute( 'type', 'button' );
      t_NewElement.setAttribute( 'onclick', 'do_new_action();' );
 
      t_Position.insertBefore( t_NewElement, t_Position.firstChild );
      t_Position.insertBefore( document.createTextNode( ' ' ), t_Position.firstChild );
   }
});

function do_new_action() {
   if ( !document.getElementById( 'wpTextbox1' ) ) return;
   var t_Inhalt = document.getElementById( 'wpTextbox1' ).value;
   var t_Template = '';
   var t_Sprache = '';
   if ( t_Inhalt.indexOf('{{Andere Sprachen|') != -1 ) {
      t_Template = 'Andere Sprachen';
      t_Sprache = 'de';
   } else
   if ( t_Inhalt.indexOf('{{andere Sprachen|') != -1 ) {
      t_Template = 'andere Sprachen';
      t_Sprache = 'de';
   } else
   if ( t_Inhalt.indexOf('{{другие языки|') != -1 ) {
      t_Template = 'другие языки';
      t_Sprache = 'ru';
   } else
   if ( t_Inhalt.indexOf('{{Andere talen|') != -1 ) {
      t_Template = 'Andere talen';
      t_Sprache = 'nl';
   } else
   if ( t_Inhalt.indexOf('{{andere talen|') != -1 ) {
      t_Template = 'andere talen';
      t_Sprache = 'nl';
   } else
   if ( t_Inhalt.indexOf('{{Other languages|') != -1 ) {
      t_Template = 'Other languages';
      t_Sprache = 'en';
   } else
   if ( t_Inhalt.indexOf('{{other languages|') != -1 ) {
      t_Template = 'other languages';
      t_Sprache = 'en';
   } else
   if ( t_Inhalt.indexOf('{{Andere Sprachen|') != -1 ) {
      t_Template = 'Andere Sprachen';
      t_Sprache = '';
   } else {
      alert( 'Vorlage nicht gefunden!' );
      return;
   }

   if ( ( t_PositionStart = t_Inhalt.indexOf( '{{'+t_Template+'|' ) ) != -1 ) {
      t_PositionEnd = t_Inhalt.indexOf('}}', t_PositionStart );
      var t_Andere_Sprachen = t_Inhalt.slice( t_PositionStart, t_PositionEnd + 2 );

      // alert( 't_Andere_Sprachen' + t_Andere_Sprachen );

      t_Inhalt = t_Inhalt.replace( t_Andere_Sprachen + '\r\n', '' );
      t_Inhalt = t_Inhalt.replace( t_Andere_Sprachen + '\r', '' );
      t_Inhalt = t_Inhalt.replace( t_Andere_Sprachen + '\n', '' );
      t_Inhalt = t_Inhalt.replace( t_Andere_Sprachen, '' );

      t_Andere_Sprachen = t_Andere_Sprachen.replace( '}}', '' );
      var t_Interwikis = t_Andere_Sprachen.split("|[[");
      var t_InterwikiAusgabe = '';

      for ( var i = 1; i < t_Interwikis.length; i++ ) {
          t_Interwikis[i] = t_Interwikis[i].replace( ']]', '' );
          var t_Interwiki = t_Interwikis[i].split("|");
          if ( t_Interwiki[1] && ( t_Interwiki[1] != t_Sprache || t_Interwiki[0] != wgTitle ) ) {
             t_InterwikiAusgabe += '[[' + t_Interwiki[1] + ':' + t_Interwiki[0] + ']]\r\n';
          }
      }
      t_Inhalt += t_InterwikiAusgabe;
  
      // alert( 'Go' + t_InterwikiAusgabe );

      document.getElementById( 'wpTextbox1' ).value = t_Inhalt;

      document.editform.wpSummary.value = 'Vorlage '+t_Template+' in Interwikis getauscht';
      document.editform.wpMinoredit.checked = true;
      document.editform.submit();
   }
}