Difference between revisions of "MediaWiki:Common.js"

From The PS/2 Project
Jump to: navigation, search
Line 1: Line 1:
 
/* Any JavaScript here will be loaded for all users on every page load. */
 
/* Any JavaScript here will be loaded for all users on every page load. */
var a_noexist =$("a.new");
+
$( "a.new" ).each(function( i ) {
var a_href = a_noexist.attr("href");
+
var a_href = this.attr("href");
 
if (a_href.indexOf("action=edit") >= 0){
 
if (a_href.indexOf("action=edit") >= 0){
a_noexist.css("color","#A34221");
+
this.css("color","#A34221");
 
}
 
}
 +
});

Revision as of 18:27, 9 December 2017

/* Any JavaScript here will be loaded for all users on every page load. */
$( "a.new" ).each(function( i ) {
var a_href = this.attr("href");
if (a_href.indexOf("action=edit") >= 0){
this.css("color","#A34221");
}
});