मीडियाविकि:Gadget-ContrastReducer.js

ध्यान दें: प्रकाशित करने के बाद बदलाव देखने के लिए आपको अपने ब्राउज़र के कैश को हटाना पड़ सकता है।

  • Firefox/Safari: Reload क्लिक समय Shift दबाएँ, या फिर Ctrl-F5 या Ctrl-R दबाएँ (Mac पर ⌘-R)
  • Google Chrome: Ctrl-Shift-R दबाएँ (Mac पर ⌘-Shift-R)
  • Internet Explorer/Edge: Refresh पर क्लिक करते समय Ctrl दबाएँ, या Ctrl-F5 दबाएँ
  • Opera: Ctrl-F5 दबाएँ।
// Script to shade the background and edit boxes to lower contrast and 
// avoid eyestrain
//
// Complain to User:Inductiveload

/* global jQuery, mw */

jQuery( document ).ready( function() {
	
	var currentAction = mw.config.get('wgAction');
	
	if (currentAction == "edit" || currentAction == "submit"){
	
		var colourEditInterfaceBackground = function( pageBG, editboxBG, fontColour, linkColour, newLinkColour, extLinkColour){ 
		
			style = $('<style type="text/css" />').appendTo('head');
			
			style.append(
				'#content		{background-color:'+ pageBG +' !important;}\
				#content		{color:'+ fontColour +' !important;}\
				a				{color:'+ linkColour +' !important;}\
				.new			{color:'+ newLinkColour +' !important;}\
				.extiw			{color:'+ extLinkColour +' !important;}\
				textarea, input	{background-color:'+editboxBG +' !important;}');
		};
		
		colourEditInterfaceBackground('#DDD', '#DDD', '#222', '#22F', '#BA0000', '#33F');
	}
});

//alternative colours
//colourEditInterfaceBackground('#228', '#228', '#FDD', '#DFD', '#BFB');