User:Minh Nguyen/chide.js
Jump to navigation
Jump to search
Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Press Ctrl-F5.
mw.loader.using("jquery.confirmable", function () {
var link = $("<a>").attr("href", "#");
link.text("chide");
link.confirmable({
i18n: {
confirm: "Publicly throw shade?",
no: "Cancel",
noTitle: "Cancel the throwing of shade",
yes: "Chide",
yesTitle: "Throw some shade"
},
handler: function (e) {
e.preventDefault();
var wrapper = $(this).closest(".jquery-confirmable-wrapper");
wrapper.before("chided");
wrapper.remove();
}
});
var span = $("<span>").append(link);
$("li > .mw-changeslist-links:last-child").append(span);
});