MediaWiki:Gadget-friendlytalkback.js: Difference between revisions
Content added Content deleted
imported>MusikAnimal (v2.0 at 0d4df2b: Fix silly slip-up in AFC helpdesk code) |
imported>MusikAnimal (v2.0 at edf3881: Suppress edit summary pings by prefixing links with a colon (T189067)) |
||
Line 85: | Line 85: | ||
// Check whether the user has opted out from talkback |
// Check whether the user has opted out from talkback |
||
⚫ | |||
// TODO: wgCategories is only set on action=view (bug 45033) |
|||
⚫ | |||
var wgcat = mw.config.get("wgCategories"); |
|||
⚫ | |||
if (wgcat.length && wgcat.indexOf("Users who do not wish to receive talkbacks") === -1) { |
|||
⚫ | |||
Twinkle.talkback.optout = false; |
|||
⚫ | |||
} else { |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
}; |
|||
⚫ | |||
⚫ | |||
⚫ | |||
}; |
}; |
||
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:"; |