User:Technical 13/vector.js

importScript( 'MediaWiki:Gadget-protectionNotices.js' );//For now for testing MediaWiki:Gadget-protectionNotices.js...

/* 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]); }	} }

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

/* Testing for User:Technical_13/Scripts/Gadget-nsShortener.js */ importScript('User:Technical_13/Scripts/Gadget-nsShortener.js');//User:Technical_13/Scripts/Gadget-nsShortener

/* Special:DoubleRedirects project */ importScript( 'MediaWiki:Gadget-DoubleRedirects.js' );