Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Chrome - Override White Blank page between webpage loads [closed]

I'm looking for different Chrome apps to make my pages darker/inverted to reduce eye strain, I found some apps that work but the only thing left, which these apps doesn't seem to override, is the White Blank page.

When a new page is loaded, Chrome first displays a White Blank page, while the page is loading then displays the website's content. Is there a way to override this While page to say Black? At the moment, everytime I click on a link or open a new webpage, the screen goes from darkcoloured (through inverted/darkening page apps) to the White Blank screen for a brief second then the new page loads in a dark colour again. This acts like a "White Flash" by the screen everytime a new page is loaded and causes further eye strain. This is why I want to know if there is a way to override this White colour to Black.

Ps. If this post is in the wrong forum, I apologise, Google Chrome Developers page had a link to Forums which brought me here :)

Thanks.

like image 258
KickAss Avatar asked Apr 26 '13 18:04

KickAss


People also ask

Why does my Chrome screen go white?

METHOD 1 – Clear Chrome's Caches, Cookies, History & Other Junk. If Google Chrome blank screen error is continuously appearing on your screen, it might be due to corrupted browser caches, cookies, junk files, and other residues. Therefore, clearing all the unwanted residues might fix the issue.

Why does webpage load and then go blank?

The reasons fall into three categories: 1, a server-related problem; 2, a network problem; and 3, a client browser or computer problem. Once you figure out the reason for the blank page, you can take the appropriate action, which may involve fixing a misconfiguration on your computer or contacting the site's webmaster.

Why am I getting a blank page when doing a Google search?

They have variously been suggested as caused by a bug in Google search, a bug in the browser, a browser setting, a bad operating system update, and malware. It is not related to ad blockers. Here are some suggestions we found after a few hours' research. They may be only temporary fixes.


1 Answers

manifest.json

{     "name": "Background",     "permissions" : ["http://*/*", "https://*/*"],     "version": "1.0",     "content_scripts": [{         "matches": ["http://*/*", "https://*/*"],         "js": ["script.js"],         "all_frames": false,         "run_at": "document_start"     }],     "manifest_version": 2 } 

script.js

var color = document.documentElement.style.backgroundColor; document.documentElement.style.backgroundColor = "black"; var observer = new MutationObserver(function(mutations) {     mutations.forEach(function(mutation) {         if (mutation.target.nodeName == "BODY") {             observer.disconnect();             document.documentElement.style.backgroundColor = color || "";         }     }); }); observer.observe(document, { childList: true, subtree: true }); 

Put all of the files in a folder. In chrome, go to Settings -> Extensions -> turn on Developer Mode -> Load unpacked extension -> Choose the folder you just created.

like image 128
Red John Avatar answered Oct 01 '22 03:10

Red John