I decided to transform the appearance of my web pages into a stylish The Matrix theme on Google Chrome, specifically for improved readability in night mode. To achieve this goal, I embarked on the journey of developing a custom Google Chrome extension. The initial step involved crafting a script for the desired functionality.
Goal:
My objective is to create an effect like the following:
Selecting the body tag within each HTML page and applying the following style properties-
background-color: black;
color: lime;
My Approach:
Below is the code snippet that I started with for scripting, although it appears to be encountering some issues. I am seeking assistance in identifying my errors, and any suggestions for improvement would be greatly appreciated.
<!doctype html>
<html>
<head>
<script type="text/javascript">
document.getElementsByTagName('body')[0].style.color = "lime";
document.getElementsByTagName('body')[0].style.background-color = "black";
</script>
</head>
<body>
<p>Hello</p>
</body>
</html>