User:Chicocvenancio/HelpDeskTBLinks.js: Difference between revisions

Content deleted Content added
missing dependencies
Maintenance: mw:RL/MGU - Updated deprecated module name, Updated deprecated user.tokens key
 
(One intermediate revision by the same user not shown)
Line 1:
if ((mw.config.get('wgPageName') === "Wikipedia:Help_desk") || (mw.config.get('wgPageName') === "Wikipedia:Media_copyright_questions") || (mw.config.get('wgPageName') === "Wikipedia:New_contributors'_help_page/questions") || (mw.config.get('wgPageName') === "Wikipedia:Editor_assistance/Requests") && mw.config.get('wgAction') === 'view') {
mw.loader.using(['mediawiki.util', 'mediawiki.api', 'jquery.tipsy', 'jquery.ui.dialog', 'jquery.ui.autocomplete', 'jquery.ui.widget'], function () {
$(mw.TBLinks()); });
};
Line 38:
section : 'new',
summary : "Talkback: you've got messages!",
token : mw.user.tokens.get('editTokencsrfToken')
};
$.ajax({
Line 48:
if (data && data.edit && data.edit.result && data.edit.result === 'Success') {
TBLinks.useDialog('Success', 'Success in sending your talkback (<a href="' +
mw.util.wikiGetlinkgetUrl( page ) + '">Open</a>) (<a href="' +
mw.util.wikiGetlinkgetUrl( page ) + '?diff=0">diff</a>)', 'nprompt-dialog');
} else {
TBLinks.useDialog('Error!!', 'There was an error requesting the edit. Code: ' + data.error.code + '": ' + data.error.info, 'nprompt-dialog');