ebooksgratis.com

See also ebooksgratis.com: no banners, no cookies, totally FREE.

CLASSICISTRANIERI HOME PAGE - YOUTUBE CHANNEL
Privacy Policy Cookie Policy Terms and Conditions
User:Lupin/nichalp links.js - Wikipedia, the free encyclopedia

User:Lupin/nichalp links.js

From Wikipedia, the free encyclopedia

Note: After saving, you have to bypass your browser's cache to see the changes. In Internet Explorer and Firefox, hold down the Ctrl key and click the Refresh or Reload button. Opera users have to clear their caches through Tools→Preferences, see the instructions for Opera. Konqueror and Safari users can just click the Reload button.

// culled from [[User:Lupin/popups.js]]
 
function nichalp_articleFromURL(h) {
  if (typeof h != 'String') h=String(h);
  h=decodeURI(h);
  var m=RegExp('[^:]*://en\\.wikipedia\\.org/(wiki/|w/index\\.php\\?title=)([^&?]*)').exec(h);
  if(m===null) return null;
  return m[2];
}
 
function nichalp_isIpUser(user) {
  return RegExp('(User:)?' + 
                '((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}' + 
                '(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])')
    .test(user);
}
 
function nichalp_removeAnchor(article) {
  // is there a #? if not, we're done
  var i=article.indexOf('#');
  if (i == -1) return article;
  return article.substring(0,i);
}
 
function nichalp_userName(article) {
  var i=article.indexOf('User');
  var j=article.indexOf(':');
  if  (i != 0 || j == -1) return null;
  var k=article.indexOf('/');
  if (k==-1) return article.substring(j+1);
  else return article.substring(j+1,k);
}
 
// do it
 
function nichalp_customLinks() {
  addPurge();
  var article=nichalp_articleFromURL(document.location.href);
  if (!article) return;
  var user=nichalp_userName(article);
  if(!user) return;
  user=nichalp_removeAnchor(user);
  if (!nichalp_isIpUser(user)) {
    addToolboxLink('http://kohl.wikimedia.org/~kate/cgi-bin/count_edits?dbname=enwiki&user='+user, user+"'s edit count", 'toolbox_katestool');
  }
  var special='http://en.wikipedia.org/w/index.php?title=Special:';
  addToolboxLink(special + 'Contributions/' + user, user+"'s contribs", 'toolbox_usercontribs');
  addToolboxLink(special + 'Log&user='+user, user+"'s log", 'toolbox_userlog');
  addToolboxLink(special + 'Blockip&ip='+user, 'Block '+user, 'toolbox_blockuser'); 
  addToolboxLink(special + 'Special:Ipblocklist&action=unblock&ip='+user, 'Unblock '+user, 'toolbox_unblockuser'); 
}
 
// make it all happen on page load
 
addOnloadHook(nichalp_customLinks);


aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - bcl - be - be_x_old - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - co - cr - crh - cs - csb - cu - cv - cy - da - de - diq - dsb - dv - dz - ee - el - eml - en - eo - es - et - eu - ext - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gan - gd - gl - glk - gn - got - gu - gv - ha - hak - haw - he - hi - hif - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kaa - kab - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mdf - mg - mh - mi - mk - ml - mn - mo - mr - mt - mus - my - myv - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - quality - rm - rmy - rn - ro - roa_rup - roa_tara - ru - rw - sa - sah - sc - scn - sco - sd - se - sg - sh - si - simple - sk - sl - sm - sn - so - sr - srn - ss - st - stq - su - sv - sw - szl - ta - te - tet - tg - th - ti - tk - tl - tlh - tn - to - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu -