Created
October 22, 2018 05:31
-
-
Save vikasrtr/4f69078e05757f21149b2c5055a78f34 to your computer and use it in GitHub Desktop.
Chnage White Background on Pages to some grey shade for eye comfort
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Keep adding more sites | |
javascript:(function(){ | |
document.body.style.backgroundColor = "#eee"; | |
var hostname = window.location.host; | |
if (hostname.includes("medium.com")) { | |
var mediumDivs=document.getElementsByClassName("section-content"); | |
Array.prototype.forEach.call(mediumDivs,function(e){e.style.backgroundColor="#eee"}); | |
} else if (hostname.includes("spark.apache.org")) { | |
var sparkDocs=document.getElementsByClassName("container-wrapper"); | |
Array.prototype.forEach.call(sparkDocs,function(e){e.style.backgroundColor="#eee"}); | |
var sparkDocs=document.getElementsByClassName("content"); | |
Array.prototype.forEach.call(sparkDocs,function(e){e.style.backgroundColor="#eee"}); | |
} else if (hostname.includes("aws.amazon.com")) { | |
var amazonDocMain = document.getElementById("main"); | |
amazonDocMain.style.backgroundColor="#eee"; | |
} else if (hostname.includes("github.intuit.com") || hostname.includes("github.com")) { | |
var githubReadMe = document.getElementsByClassName("entry-content"); | |
Array.prototype.forEach.call(githubReadMe,function(e){e.style.backgroundColor="#eee"}); | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
🎉 Too much room for optimisations