MediaWiki:Common.js: Difference between revisions

m
no edit summary
mNo edit summary
mNo edit summary
Line 1: Line 1:
 
var usesClass = (function () {
/* <pre> */
/* Any JavaScript here will be loaded for all users on every page load. */
 
/* Return whether a particular class is used**************************************
* Description: Uses regular expressions and caching for better performance.
*/
var usesClass = (function () {
     var reCache = {};
     var reCache = {};
     return function (element, className) {
     return function (element, className) {
Line 482: Line 474:
/****************************** Common Gradient ******************************/
/****************************** Common Gradient ******************************/
$(function(){
$(function(){
    $('table > tbody > tr').each(function(){
        console.log($(this).css('background-color');
    };
/* Debugging
     $('table > tbody > tr > th').each(function(){
     $('table > tbody > tr > th').each(function(){
         var bgc = $(this).css('background-color');
         var bgc = $(this).css('background-color');
         $(this).css('background-image', 'linear-gradient(to bottom, #eee, ' + bgc + ')');
         $(this).css('background-image', 'linear-gradient(to bottom, #eee, ' + bgc + ')');
     })
     });
*/
});
});