Unterschied: MediaWiki:Common.js
MediaWiki interface page
Ansichten
Aktionen
Namensräume
Varianten
Werkzeuge
Admin (Diskussion | Beiträge) |
Admin (Diskussion | Beiträge) |
||
Zeile 8: | Zeile 8: | ||
var href = window.location.href; | var href = window.location.href; | ||
if (href.includes('redlink')) { | if (href.includes('redlink') || href.includes('create')) { | ||
href = href.replace('edit', 'formedit'); | href = href.replace('edit', 'formedit'); | ||
href = href.replace('redlink=1', ''); | href = href.replace('redlink=1', ''); | ||
href = href.replace('create', ''); | |||
window.location.href = href; | window.location.href = href; | ||
} | } |
Version vom 16. Juni 2021, 06:49 Uhr
/* Das folgende JavaScript wird für alle Benutzer geladen. */
/*$('a.new').click(function(e) {
e.preventDefault();
let href = $(e.target).attr('href').replace('edit', 'formedit');
window.location.href = href;
});*/
var href = window.location.href;
if (href.includes('redlink') || href.includes('create')) {
href = href.replace('edit', 'formedit');
href = href.replace('redlink=1', '');
href = href.replace('create', '');
window.location.href = href;
}