User:Technical 13/vector.js

/* RC long dates */ if( mw.config.get( 'wgCanonicalSpecialPageName' ) === 'Recentchanges' ){ $( 'div.mw-changeslist h4' ).each( function( n, h4date ) { var arrDaysOfWeek = [ 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' ];    var strDate = h4date.innerText;    h4date.innerText = arrDaysOfWeek[ ( new Date( strDate ) ).getDay ] + ', ' + strDate;  } ); $( 'fieldset.rcoptions' ).html(   $( 'fieldset.rcoptions' ).html      .replace( ' minor edits | ', ' minor | ' )      .replace( ' anonymous users | ', ' IPs | ' )      .replace( ' registered users | ', ' users | ' )      .replace( ' patrolled edits | ', ' patrolled | ' )      .replace( ' my edits', ' mine' )  ); }

/* UserCSSJS */// To make it easy to navigate to your own custom CSS and JS pages // Special:MyPage/common.css Special:MyPage/common.js // Special:MyPage/vector.css Special:MyPage/vector.js

importScript( 'MediaWiki:Gadget-DeOrphaner.js' );// Gadget-DeOrphaner.js

importScript( 'MediaWiki:Gadget-spamBlock.js/sandbox.js' );// Gadget-spamBlock.js/sandbox.js

importScript( 'MediaWiki:Gadget-editBox.js' );// Gadget-editBox.js

/* BD */// Testing new code for "Better Diffs" $( '.diff-otitle' ).append( ' -' + $( '.diff-deletedline' ).text.length + ' ' ); $( '.diff-ntitle' ).append( ' +' + $( '.diff-addedline' ).text.length + ' ' ); var intDiff = $( '.diff-addedline' ).text.length - $( '.diff-deletedline' ).text.length; $( '.diff-otitle' ).parents( 'tr' ).after(	' Change this edit: = 500 ? 'bold' : 'inherit' ) + ';">' + intDiff + '  '	);

/* QL */// Testing for Template:Quest list and MediaWiki:Template-Quest list.js //importScript( 'MediaWiki:Template-Quest list.js' );

/* Logout */// Remind me to log out when at school //importScript( 'User:Technical_13/Scripts/logout.js' );// User:Technical_13/Scripts/logout

/* diff_links */// Test for adding links in diffs if( $( 'table.diff' ).length != 0 ) { if( $( 'table.diff' ).text.match( /([\d\w\s]*?)\.(jpg|png|jpeg|bmp)/gi ) != null ) { Array.prototype.unique = function( a ) { return function{ return this.filter( a ) } }( function( a, b, c ){ return c.indexOf( a, b+1 ) < 0 } ); var linkedHTML = ''; var linkedText = $('table.diff').text.match(/([\d\w\s:]*?)\.(jpg|png|jpeg|bmp)/gi); console.log('linkedText: %s', linkedText); var linkDestination = $('table.diff').text.match(/([\d\w\s]*?)\.(jpg|png|jpeg|bmp)/gi); console.log('linkDestination: %s', linkDestination); linkedText = linkedText.unique; console.log('unique linkedText: %s', linkedText); linkDestination= linkDestination.unique; console.log('unique linkDestination: %s', linkDestination); for(var i=0; i<linkedText.length; i++){ linkedText[i] = linkedText[i].trim; console.log('linkedText[%d]: %s', i, linkedText[i]); linkedHTML = $('table.diff').html.closest(':contains(linkDestination[i].substr(0, (linkDestination[i].length - 4)))'); console.log('linkedHTML: %s', linkedHTML); linkDestination[i] = linkDestination[i].trim; console.log('linkDestination[%d]: %s', i, linkDestination[i]); //			$('table.diff').html($('table.diff').html.replace(linkedHTML[i], '' + linkedHTML[i] + '')); console.log('.replace: %s ::with: %s', linkedHTML[i], linkDestination[i], linkedText[i], linkedHTML[i]); }	} }