Chú ý: Sau khi lưu thay đổi trang, bạn phải xóa bộ nhớ đệm của trình duyệt để nhìn thấy các thay đổi. Google Chrome, Firefox, Internet ExplorerSafari: Giữ phím ⇧ Shift và nhấn nút Reload/Tải lại trên thanh công cụ của trình duyệt. Để biết chi tiết và hướng dẫn cho các trình duyệt khác, xem Trợ giúp:Xóa bộ nhớ đệm.

//Thay thế thủ công
function replacetxt()
{
withw = '';
what = prompt("Bạn muốn thay chữ nào?" + "\n" + "Bạn có thể dùng các lệnh regex." + "\n" + "Put '//' trước và sau câu để dùng regex.");
if (what == ''){alert("Lệnh không hợp lệ."); return;}
else if (what == null){alert("Thao tác bị hủy."); return;}
what_GUI = what;
if (what.replace('//','').replace('//','') == what.split('//')[1])
  {
  what = what.split('//')[1]
  replacetxtdone(what.split('//')[0],1,what);
  }
else
  {
  what = what.replace(/\\/g,"\\\\");
  what = what.replace(/\(/g,"\\(").replace(/\)/g,"\\)");
  what = what.replace(/\{/g,"\\{").replace(/\}/g,"\\}");
  what = what.replace(/\[/g,"\\[").replace(/\]/g,"\\]");
  what = what.replace(/\|/g,"\\|");
  what = what.replace(/\./g,"\\.");
  what = what.replace(/\$/g,"\\$");
  what = what.replace(/\+/g,"\\+");
  what = what.replace(/\^/g,"\\^");
  what = what.replace(/\?/g,"\\?");
  what = what.replace(/\*/g,"\\*");
  what = what.replace(/\//g,"\\/");
  replacetxtdone(what,0,what_GUI);
  }
}
//END

//Manual replace
function replacetxtdone(s,regexon,what_GUI)
{
var original = document.editform.wpTextbox1.value;
if(s) 
{ 
  if (regexon==1)
  {var r = prompt('Thay "' + what_GUI + '" bằng? (Regex)');}
  else
  {var r = prompt('Thay "' + what_GUI + '" bằng?');}
if(!r && r != '') {alert('Action cancelled.'); return;} 
if (r == ''){alert("Tất cả các chữ như vậy sẽ bị xóa.");}
var txt = document.editform.wpTextbox1;
var rep = RegExp(s,"g");
txt.value = txt.value.replace(rep, r); 
  form = document.getElementById('bodyContent');
  l = form.getElementsByTagName('input');
  for (i = 0; i < l.length; i++)
    {
    if (l[i].name == 'wpMinoredit')
      {l[i].value = '1'; l[i].checked=true;}
    }
if (document.editform.wpTextbox1.value == original){alert('Trong thấy chữ đó trong trang này.'); return;}
document.editform.wpSummary.value += 'JS: Đang thay thế "' + what_GUI + '" bằng "' + r + '". ';
 }
}
//END

//---------------------------------------------------------------
//add tab
$(replacetab)
function replacetab()
{
if (document.title.indexOf("Editing ") != -1)
    {
    addToolboxLink("javascript:replacetxt()","Trình thay thế văn bản","txt-repl");
    }
}
//END

////////////REDIRECTS////////////
$(redir_other_add)
function redir_other_add()
{
if (document.title.search(/Editing |Edit conflict/) != 0)
{addToolboxLink('javascript:redire_other()','Redirect to here','redir-hr','`');}
if (location.href.indexOf('&action=edit&jsaction=Redirect&target=') != -1)
  {
  var page = unescape(location.href.split('&target=')[1]);
  var redirect = '#REDIRECT [[' + page + ']]';
  var message = 'Note: Page already exists. Override?';
  if (document.editform.wpTextbox1.value != '')
  {
  var override = confirm(message);
  if (!override){return;}
  }
  document.editform.wpTextbox1.value = redirect;
  document.editform.wpSummary.value = 'Redirect to [[' + page + ']]';
  var form = document.getElementById('bodyContent');
  l = form.getElementsByTagName('input');
  for (var i = 0; i < l.length; i++)
      {
     if (l[i].name == 'wpMinoredit')
     {l[i].value = '1'; l[i].checked=true; break;}
      }
  }
}

function redire_other()
{
var page = document.title.replace('Editing ','').replace('Edit Conflict','').replace('Edit conflict','').split(' - ')[0];
var txt = new String; 
var foundIn = ''; 
if (window.getSelection) 
{ 
txt = window.getSelection(); 
foundIn = 'window.getSelection()'; 
} 
else if (document.getSelection) 
{ 
txt = document.getSelection(); 
foundIn = 'document.getSelection()'; 
} 
else if (document.selection) 
{ 
txt = document.selection.createRange().text;
 foundIn = 'document.selection.createRange()'; 
} 
else 
{var txt = prompt('Không thấy chữ nào được chọn. Xin nhập vào tên trang:');}
if (!txt || txt == '')
{var txt = prompt('Không thấy chữ nào được chọn. Xin nhập vào tên trang:');}
if (!txt || txt == ''){return;}
URL = 'http://vi.wikipedia.org/w/index.php?title=' + txt + '&action=edit&jsaction=Redirect&target=' + page;
URL = URL.replace(' &action','&action');
location.href = URL;
}