MediaWiki:Common.js: Difference between revisions

From Off Grid Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 3: Line 3:
$('a').each(function(){
$('a').each(function(){
   if ($(this).attr('href') && $(this).text():contains('Internal')) { // get only links with href set
   if ($(this).attr('href') && $(this).text():contains('Internal')) { // get only links with href set
       $this.addClass("internal")
       $(this).addClass("internal")
   }
   }
});
});

Revision as of 16:30, 2 November 2017

/* Any JavaScript here will be loaded for all users on every page load. */

$('a').each(function(){
   if ($(this).attr('href') && $(this).text():contains('Internal')) { // get only links with href set
      $(this).addClass("internal")
   }
});