Jump to content

User:Jarry1250/vector.js

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Jarry1250 (talk | contribs) at 09:50, 13 June 2012 (+ importScript('User:Ohconfucius/script/MOSNUM dates.js');). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
//Let's do this thing. Security ftw.
var wikEdConfig = {};
wikEdConfig.imagePath = '/media/wikipedia/commons/';
// importScript('User:Splarka/ajaxfilemove.js');
importScript('User:John254/mass rollback.js')
importScript('User:Anomie/linkclassifier.js'); // Linkback: [[User:Anomie/linkclassifier.js]]
importScript('User:Shubinator/DYKcheck.js'); //DYKcheck tool
popupFixDabs=true;
popupAdminLinks=true;
importScript('User:X!/userrights.js');
importScript('User:AWeenieMan/furme.js');//Fair use rational
// importScript('User:Ale_jrb/Scripts/csdhelper.js');  //[[User:Ale_jrb/Scripts]]
importScript("User:GregU/dashes.js");
importScript('User:Ucucha/HarvErrors.js');
importScript('User:Mr.Z-man/refToolbar.js');
importScript('User:Ohconfucius/script/MOSNUM dates.js');

jQuery(document).ready(function() {
  var found =  new Array();
  var shortened = new Array();
  $('a[href^="/wiki/Special:Contributions/2"]').each( function(){
   if( $(this).attr('href').match('^/wiki/Special:Contributions/([0-9A-F]{1,4}:){7}[0-9A-F]{1,4}$') ){
    $(this).attr( 'title',$(this).text() );
    var blocks = $(this).text().split(':');
    var suggested;
    for( var i = 4; i < 9; i++ ){
        suggested = blocks.slice( 0, i ).join(':');
        if( !( shortened.indexOf( suggested ) !== -1 && found.indexOf( suggested ) === -1 ) ){
           shortened.push( suggested );
           found.push( $(this).text() );
           break;
        }
    }
    $(this).text( suggested );
   }
  });
});