MediaWiki:Gadget-Prosesize.js: Difference between revisions
Content deleted Content added
fix |
rewrite portion |
||
Line 278:
}
jQuery(function() {▼
// Depending on whether in edit mode or preview/view mode, show the approppiate response upon clicking the portlet link
var func;
};▼
mw.util.addCSS( '#t-page-size:first-child { color:black;}');
if (func) {
}
▲ mw.loader.using(['mediawiki.util'], function() {
▲ if (mw.config.get('wgAction') == 'edit' || (mw.config.get('wgAction') == 'submit' && document.getElementById('wikiDiff'))) {
▲ $(mw.util.addPortletLink('p-tb', '#', 'Page size', 't-page-size', 'Calculate page and prose size'))
▲ e.preventDefault();
▲ alert("You need to preview the text for the prose size script to work in edit mode.");
▲ });
▲ } else if ($.inArray(mw.config.get('wgAction'), ['view', 'submit', 'historysubmit', 'purge']) !== -1) {
▲ getDocumentSize();
▲ });
▲ }
▲ });
});
|