User:Chaotic Enby/Unblock wizard.js: Difference between revisions
From Test Wiki
Content deleted Content added
Chaotic Enby (talk | contribs) rpleace |
Chaotic Enby (talk | contribs) No edit summary |
||
| Line 425: | Line 425: | ||
setMainStatus('process', msg('status-saving')); |
setMainStatus('process', msg('status-saving')); |
||
if (demoMode) { |
if (demoMode) { |
||
setMainStatus('success', '< |
setMainStatus('success', '<code style="display: block; white-space: pre-wrap">' + text + '</code>'); |
||
} 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(/\{\{pb\}\}/g, '<br>') |
||
.replace( |
.replace( |
||
/\[\[:?(?:([^|\]]+?)\|)?([^\]|]+?)\]\]/g, |
/\[\[:?(?:([^|\]]+?)\|)?([^\]|]+?)\]\]/g, |
||