Benutzer:WOSlinker/common.js
Hinweis: Leere nach dem Veröffentlichen den Browser-Cache, um die Änderungen sehen zu können.
- Firefox/Safari: Umschalttaste drücken und gleichzeitig Aktualisieren anklicken oder entweder Strg+F5 oder Strg+R (⌘+R auf dem Mac) drücken
- Google Chrome: Umschalttaste+Strg+R (⌘+Umschalttaste+R auf dem Mac) drücken
- Internet Explorer/Edge: Strg+F5 drücken oder Strg drücken und gleichzeitig Aktualisieren anklicken
- Opera: Strg+F5
function font_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 'font edit' tab
if(mw.config.get('wgArticleId') != 0 ) {
$( function fontEditButton() {
mw.util.addPortletLink('p-cactions',
mw.util.getUrl(null,{action:'edit',font:true}),
'font',
'p-font',
'font edit');
}
)}
if(mw.config.get('wgAction') == 'edit' && font_queryString('font') == 'true') {
$(function font() {
var myContent = document.getElementById('wpTextbox1').value;
myContent = myContent.replace(/\| \<big\>(\'\'\'.*?\'\'\') \|\| \ \; \|\| align\=right \|\<big\>(\'\'\'.*?\'\'\')\n/,'| <big>$1</big> || || align=right |<big>$2</big>\n');
myContent = myContent.replace(/\| \<big\>([^\']*? *)\|\| \ \; \|\| align\=right \|\<big\>([^\']*?)\n/,'| <big>$1</big> || || align=right |<big>$2</big>\n');
if(document.getElementById('wpTextbox1').value != myContent) {
document.getElementById('wpTextbox1').value=myContent;
document.getElementById('wpSummary').value='big [[Spezial:LintErrors/multiple-unclosed-formatting-tags|lint]]';
document.getElementById('wpMinoredit').checked = true;
}
if(document.getElementById('wpTextbox1').value == myContent) {
myContent = myContent.replace(/\{\{Versalien\|\{\{LineCenterSize\|(\d*)\|(\d*)\|\'\'\'([^\']*)\'\'\'\}\}\}\}/,'{{LineCenterSize|$1|$2|{{Versalien|\'\'\'$3\'\'\'}}}}');
if(document.getElementById('wpTextbox1').value != myContent) {
document.getElementById('wpTextbox1').value=myContent;
document.getElementById('wpSummary').value='nesting [[Spezial:LintErrors/html5-misnesting|lint]]';
document.getElementById('wpMinoredit').checked = true;
}
}
}
)}