colourify

This script makes all the web pages colorful.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

You will need to install an extension such as Tampermonkey to install this script.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

// ==UserScript==
// @name        colourify
// @namespace   colour
// @description This script makes all the web pages colorful.
// @include     *
// @version     1
// @grant       none
// ==/UserScript==
var anchors = document.body.getElementsByTagName('p');
var a = [
  'blue',
  '#000000',
  '#660033',
  '#006666'
];
var b = [
  '#f2f2f2',
  '#ffffcc',
  '#ccff99',
  '#b3ffff',
  '#66ff66',
  ' #ffe6b3'
];
for (var i = 0; i < anchors.length; i++)
{
  //anchors[i++].innerHTML =  anchors[Math.floor(Math.random()*anchors.length)].innerHTML ;
  // anchors[i].innerHTML = anchors[i++].innerHTML;
  //anchors[i].style.color = a[Math.floor(Math.random()*a.length)] ;
  anchors[i].style.background = b[Math.floor(Math.random() * b.length)];
  // anchors[i].style.border = "thin";
  //anchors[i].style.borderBottomColor = "red";
  /*  


 */
}
var anchors = document.body.getElementsByTagName('div');
var a = [
  'blue',
  '#000000',
  '#660033',
  '#006666'
];
var b = [
  '#f2f2f2',
  '#ffffcc',
  '#ccff99',
  '#b3ffff',
  '#66ff66',
  ' #ffe6b3'
];
for (var i = 0; i < anchors.length; i++)
{
  //anchors[i].innerHTML = anchors[i++].innerHTML;
  // anchors[i++].innerHTML =  anchors[i].innerHTML ;
  anchors[i].style.color = a[Math.floor(Math.random() * a.length)];
  // anchors[i].style.background = b[Math.floor(Math.random()*b.length)] ;
}



function addGlobalStyle(css) {
    var head, style;
    head = document.getElementsByTagName('head')[0];
    if (!head) { return; }
    style = document.createElement('style');
    style.type = 'text/css';
    style.innerHTML = css;
    head.appendChild(style);
}

addGlobalStyle('p { box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);  padding: 4px 16px;   border-radius: 20px; }');

//addGlobalStyle('a { box-shadow: 0 4px 6px 0px rgba(0,0,0,0.2);border-radius: 5px; }');

// font-size: large ! important;