# MediaWiki:Gadget-UserEditCount.js

From faraghaib
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)
- Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.

    $(function() {
        mw.util.addPortletLink('p-tb', '//tools.wmflabs.org/xtools/pcount/?name=' + mw.config.get('wgUserName') + '&lang=fa&wiki=wikipedia', 'تعداد ویرایش (' + mw.config.get('wgUserName') + ')', '');

        var cur_user = "";
        if (mw.config.get('wgCanonicalNamespace') == "User" || mw.config.get('wgCanonicalNamespace') == "User_talk"){
            var slashpos = mw.config.get('wgTitle').indexOf('/');
            cur_user = slashpos != -1 ? mw.config.get('wgTitle').substr(0, slashpos) : mw.config.get('wgTitle');
        }

        if (cur_user !== "") {
            mw.util.addPortletLink('p-tb', '//tools.wmflabs.org/xtools/pcount/?name=' + cur_user + '&lang=fa&wiki=wikipedia', 'تعداد ویرایش (' + cur_user + ')', '');
        }
    });

Retrieved from "https://en.faraghaib.ir/w/index.php?title=MediaWiki:Gadget-UserEditCount.js&oldid=214"