பயனர்:Shriheeran/ContribsTabVector.js

கட்டற்ற கலைக்களஞ்சியமான விக்கிப்பீடியாவில் இருந்து.

குறிப்பு - சேமித்த பின்னர், நீங்கள் செய்த மாற்றங்களைக் காண்பதற்கு உங்கள் உலவியின் இடைமாற்று அகற்றப்பட வேண்டும்.

  • மொஸில்லா பயர்பாக்ஸ் / சபாரி: Shift+Reload, அல்லது Ctrl-F5 அல்லது Ctrl-R (⌘-R Mac ல்)
  • கூகிள் குரோம் Ctrl-Shift-R அழுத்தவும். (⌘-Shift-R Mac ல்) ;
  • இண்டர்நெட் எக்ஸ்ப்ளோரர்: Ctrl-Refresh அல்லது Ctrl-F5 ஐ அழுத்தவும்.
  • ஒபேரா: Tools → Preferences இல் இடைமாற்றை அகற்றவும்;
/* This script adds Contributions and Statistics tabs to User and User talk pages. For Vector skin. 
 
To use this script, place the following line in your vector.js page:
 
    importScript('பயனர்:L.Shriheeran/ContribsTabVector.js');
 
Add any or all of these lines after the importScript line above to set various options (the default values are shown):
 
    var contribsTab = true;                    // Turns the Contributions tab on or off (set to false; for off)
    var contribsTabStats = true;               // Turns the Statistics tab on or off (set to false; for off)
    var contribsTabNumber = 50;                // Number of contributions to display in the Contributions tab. Can be 1 to 5000.
    var contribsTabName = "Contributions";     // Custom name for Contributions tab. Replace quoted text with your desired name.
    var contribsTabStatsName = "Statistics";   // Custom name for Statistics tab. Replace quoted text with your desired name.
 
-- End of documentation -- */
 
if (wgNamespaceNumber == 2 || wgNamespaceNumber == 3) { // Don't do anything unless we're in user or usertalk space
 
  // Set default options for any that haven't been set
  if (contribsTabName == null) var contribsTabName = "Contributions";
  if (contribsTabNumber == null) var contribsTabNumber = 50;
  if (contribsTabStats == null) var contribsTabStats = true;
  if (contribsTab == null) var contribsTab = true;
  if (contribsTabStatsName == null) var contribsTabStatsName = "Statistics";
 
  // Get the current page's username
  var username = wgTitle.split("/")[0];
 
  // Grab leftmost tab
  var contribsTabMain = $('#left-navigation li:not(.selected)').slice(0,1).css('opacity','0.9');
 
  if (contribsTab) { // Construct the contribs tab, if it's not turned off
 
     // Clone main page tab, remove 'new' class in case it was red
     var tabContribs = contribsTabMain.clone(true).attr('id', contribsTabMain.attr('id')+'-').css('opacity','0.9').removeClass('new');
 
     // Construct contribs URL
     if (wgNoticeProject == 'commons') {
         var contribsTabURL = 'http://commons.wikimedia.org/w/index.php?title=Special:Contributions&target=' +
                           username + '&limit=' + contribsTabNumber + '&uselang=' + wgPageContentLanguage;
     } else {
         var contribsTabURL = 'http://' + wgPageContentLanguage + '.' + wgNoticeProject + '.org/w/index.php?title=Special:Contributions&target=' +
                           username + '&limit=' + contribsTabNumber + '&uselang=' + wgPageContentLanguage;
     }
 
     // Set contribs tab URL, text, and tooltip
     tabContribs.find('a').attr('href', contribsTabURL).empty().text(contribsTabName).attr('title', "Show this user's contributions");
 
  }
 
  if (contribsTabStats) { // Construct the stats tab, if it's not turned off
 
     // Clone main page tab, remove 'new' class in case it was red
     var tabStats = contribsTabMain.clone(true).attr('id', contribsTabMain.attr('id')+'-').css('opacity','0.9').removeClass('new');
 
     // Construct stats URL
     var contribsTabStatsURL = 'http://tools.wmflabs.org/xtools/pcount/index.php?name=' + username + '&lang=' + 
                                wgPageContentLanguage + '&wiki=' + wgNoticeProject;
 
     // Set stats tab URL, text, and tooltip
     tabStats.find('a').attr('href', contribsTabStatsURL).empty().text(contribsTabStatsName).attr('title', "Show this user's editing statistics");
 
  }
 
  // Place constructed tabs before the first right-hand tab (done here for easy ordering)
  if (contribsTabStats) tabStats.insertBefore($('#right-navigation li').slice(0,1));
  if (contribsTab) tabContribs.insertBefore($('#right-navigation li').slice(0,1));
"https://ta.wikipedia.org/w/index.php?title=பயனர்:Shriheeran/ContribsTabVector.js&oldid=3291918" இலிருந்து மீள்விக்கப்பட்டது