User:Pikachurin/wikia.js

// Automatically fix Wikipedia links that are appearing as external links $('a[href*="wikipedia.org/wiki/"].external.exitstitial').removeClass('external exitstitial').addClass('text'); // Make images link to the image page rather than the file itself $('a.image').each(function { var url = $(this).attr('href').split('/');    url = url[url.length-1];     url = '/wiki/File:'+url; $(this).attr('href',url); });