Pangguno:WOSlinker/common.js
Catatan: Sasudah manabikkan, Sanak mungkin harus meminteh singgahan paramban Sanak untuak maliek parubahan.
- Firefox / Safari: Tahan Shift sambia mangklik Reload, atau takan Ctrl-F5 atau Ctrl-R (⌘-R di Mac)
- Google Chrome: Takan Ctrl-Shift-R (⌘-Shift-R di Mac)
- Internet Explorer/Edge: Tahan Ctrl sambia mangklik Refresh, atau takan Ctrl-F5
- Opera: Pai ka Menu → Settings (Opera → Preferences di Mac) lalu ka Privacy & security → Clear browsing data → Cached images and files.
function tidytag_queryString(p) {
var re = RegExp('[&?]' + p + '=([^&]*)');
var matches;
if (matches = re.exec(document.location)) {
try {
return decodeURI(matches[1]);
} catch (e) { }
}
return null;
}
//Add a 'tidytag edit' tab
if(mw.config.get('wgArticleId') != 0 ) {
$( function tidytagEditButton() {
mw.util.addPortletLink('p-cactions',
mw.util.getUrl(null,{action:'edit',tidytag:true}),
'tidytag',
'p-tidytag',
'tidytag edit');
}
)}
if(mw.config.get('wgAction') == 'edit' && tidytag_queryString('tidytag') == 'true') {
$(function tidytag() {
var myContent = document.getElementById('wpTextbox1').value;
myContent = myContent.replace(/(\| *settlement\_type *\= *)\'\'\'\[\[Kampung\]\]\'\'\' *\n/g,'$1[[Kampung]]\n');
if(document.getElementById('wpTextbox1').value != myContent) {
document.getElementById('wpTextbox1').value=myContent;
document.getElementById('wpSummary').value='fix [[Special:LintErrors/html5-misnesting|nesting]]';
document.getElementById('wpMinoredit').checked = true;
}
}
)}