User:Chaotic Enby/Unblock wizard.js: Difference between revisions

From Test Wiki
Content deleted Content added
code
rpleace
Line 425: Line 425:
setMainStatus('process', msg('status-saving'));
setMainStatus('process', msg('status-saving'));
if (demoMode) {
if (demoMode) {
setMainStatus('success', '<code>' + text + '</code>');
setMainStatus('success', '<syntaxhighlight lang="">' + text + '</syntaxhighlight>');
} else {
} else {
saveUserTalkPage(userTalk, apiPage.revisions[0].slots.main.content + text).then(function () {
saveUserTalkPage(userTalk, apiPage.revisions[0].slots.main.content + text).then(function () {
Line 573: Line 573:
function linkify(input) {
function linkify(input) {
return input
return input
.replace(/\{\{pb\}\}/, '<br>')
.replace(
.replace(
/\[\[:?(?:([^|\]]+?)\|)?([^\]|]+?)\]\]/g,
/\[\[:?(?:([^|\]]+?)\|)?([^\]|]+?)\]\]/g,
Line 583: Line 584:
}
}
)
)
// for ext links, display tebext should be given
// for ext links, display text should be given
.replace(
.replace(
/\[(\S*?) (.*?)\]/g,
/\[(\S*?) (.*?)\]/g,