Content deleted Content added
fix bug involving m.wikipedia.org (publish.php) |
switch to new version of publish.php (publish.php) |
||
Line 1:
// <nowiki>
$(async function() {
//
/* THIS SCRIPT IS STILL IN BETA AND IS BUGGY ABOUT 25% OF THE TIME. Be sure to check the diff that pops up before submitting.
Line 86 ⟶ 90:
let wgScriptPath = mw.config.get('wgScriptPath');
let baseURL = wgServer + wgScriptPath + '/';
// https://stackoverflow.com/a/12464290/3480193
$(`<form action="${baseURL}index.php?title=${titleEncoded}&action=submit" method="POST"/>`)
Line 176 ⟶ 179:
});
//
Line 235 ⟶ 236:
// fix redundant wikilinks, e.g. [[Spotify|Spotify]]
// change youtu.be to youtube.com, to avoid the blacklist. test: https://youtu.be/bnWHeRNIPiA
// delete ©®™
// convert all <references /> to {{Reflist}}. <references /> doesn't use two column format and looks weird with a large # of references
// remove px from images, should use default
// convert refs toward the end. we want deleteSomeHTMLTags() to run first, to get rid of
wikicode = this.bareURLToRef(wikicode);
wikicode = this.refShortLinkToLongLink(wikicode);
Line 768 ⟶ 772:
}
}
});
// </nowiki>
|