User:MC10/stubtagtab.js: Difference between revisions

Content deleted Content added
m minor fixes
fix subtle bug introduced
Line 80:
$(function () {
if (mw.config.get("wgNamespaceNumber") === 0 && mw.config.get("wgAction") === "view"
&& $("#ca-edit").length !== 0) {
var portletLink = mw.util.addPortletLink('p-cactions', '#', 'Stub', 'ca-stubtag', 'Add a stub tag to this page', '');
$(portletLink).click(function (e) {
Line 92:
x += "-stub";
}
$('"#wpTextbox1'").val($('"#wpTextbox1'").val() + "\n{" + "{" + x + "}}"); // add to the end of the article
$('"#wpSummary'").val("Tagging with {" + "{" + x + "}} using [[User:MC10/stubtagtab.js|stubtagtab.js]]");
$('"#wpPreview'").trigger('"click'");
}
});