MediaWiki:Gadget-friendlytalkback.js: Difference between revisions
Content added Content deleted
imported>Amalthea (v2.0-689-g073eb2e: talkback: Add {{please see}}; protect: Make tag expiry work for PC protection. Update protection templates; warn: Use {{{2}}} parameter for extra message; morebits: use wgRelevantUserName to get user) |
imported>Amalthea (v2.0-784-g5bac34c: warn: Move uw-generic4 down a spot; tag: Make links to each template work in IE9; talkback: Fix edit summary when "User talk:" is unnecessarily added; image: Add missing variable declaration) |
||
Line 431: | Line 431: | ||
talkpage.setEditSummary("Please check the discussion at [[" + tbPageName + "#" + section + "]]" + Twinkle.getPref("summaryAd")); |
talkpage.setEditSummary("Please check the discussion at [[" + tbPageName + "#" + section + "]]" + Twinkle.getPref("summaryAd")); |
||
} else { // tbtarget one of mytalk, usertalk, other |
|||
} else { |
|||
//clean talkback heading: strip section header markers |
// clean talkback heading: strip section header markers that were erroneously suggested in the documentation |
||
text = "\n\n==" + Twinkle.getFriendlyPref("talkbackHeading").replace( /^\s*=+\s*(.*?)\s*=+$\s*/, "$1" ) + "==\n{{talkback|"; |
text = "\n\n==" + Twinkle.getFriendlyPref("talkbackHeading").replace( /^\s*=+\s*(.*?)\s*=+$\s*/, "$1" ) + "==\n{{talkback|"; |
||
text += tbPageName; |
text += tbPageName; |
||
Line 448: | Line 448: | ||
} |
} |
||
var editSummary = "Talkback ([["; |
|||
talkpage.setEditSummary("Talkback ([[" + (tbtarget === "other" ? "" : "User talk:") + tbPageName + |
|||
if (tbtarget !== "other" && !/^\s*user talk:/i.test(tbPageName)) { |
|||
⚫ | |||
editSummary += "User talk:"; |
|||
} |
|||
⚫ | |||
talkpage.setEditSummary(editSummary + Twinkle.getPref("summaryAd")); |
|||
} |
} |
||