14,061
edits
m (1 revision imported) |
m (1 revision imported) |
||
(One intermediate revision by the same user not shown) | |||
Line 85: | Line 85: | ||
// Check whether the user has opted out from talkback | // Check whether the user has opted out from talkback | ||
var query = { | |||
var | action: 'query', | ||
prop: 'extlinks', | |||
titles: mw.config.get('wgPageName'), | |||
elquery: 'userjs.invalid/noTalkback', | |||
ellimit: '1' | |||
}; | |||
var wpapi = new Morebits.wiki.api("Fetching talkback opt-out status", query, Twinkle.talkback.callback.optoutStatus); | |||
wpapi.post(); | |||
}; | }; | ||
Line 369: | Line 363: | ||
switch (page) { | switch (page) { | ||
case "afchd": | case "afchd": | ||
text | text = "\n\n{{subst:AFCHD/u|" + section + "}} ~~~~"; | ||
talkpage.setEditSummary( "You have replies at the [[Wikipedia:AFCHD|Articles for Creation Help Desk]]" + Twinkle.getPref("summaryAd") ); | talkpage.setEditSummary( "You have replies at the [[Wikipedia:AFCHD|Articles for Creation Help Desk]]" + Twinkle.getPref("summaryAd") ); | ||
break; | break; | ||
Line 429: | Line 423: | ||
} | } | ||
text += "|more=" + message.trim() + "}}"; | text += "|more=" + message.trim() + "}}"; | ||
talkpage.setEditSummary("Please check the discussion at [[" + tbPageName + | talkpage.setEditSummary("Please check the discussion at [[:" + tbPageName + | ||
(section ? ("#" + section) : "") + "]]" + Twinkle.getPref("summaryAd")); | (section ? ("#" + section) : "") + "]]" + Twinkle.getPref("summaryAd")); | ||
Line 449: | Line 443: | ||
} | } | ||
var editSummary = "Talkback ([["; | var editSummary = "Talkback ([[:"; | ||
if (tbtarget !== "other" && !/^\s*user talk:/i.test(tbPageName)) { | if (tbtarget !== "other" && !/^\s*user talk:/i.test(tbPageName)) { | ||
editSummary += "User talk:"; | editSummary += "User talk:"; |