3

I want my content script of chrome extension to atleast load on the below page.

URL of this page is normal url of any website just WIFI is switched off or change the user network to offline from the developers tools.

enter image description here

Pacerier
  • 86,231
  • 106
  • 366
  • 634
squiroid
  • 13,809
  • 6
  • 47
  • 67

1 Answers1

3

The error page is displayed via data:text/html,chromewebdata URL which you can see by typing location.href in devtools console and its Sources panel.

The data: scheme is not scriptable, there's nothing you can do about it AFAIK.
Even webRequest API can't intercept it.

wOxxOm
  • 65,848
  • 11
  • 132
  • 136
  • I want to themify this page and build a chrome extension over it which can replace or give this page a better look and feel. I have done the POC for this with appending HTML and CSS but didn't consider that chrome extension would have some blockers for this. https://drive.google.com/file/d/0BwKRQpiClfAaZmppc1A2Z3phb1E/view?usp=sharing https://drive.google.com/file/d/0BwKRQpiClfAadktPbUFNZGl5Vms/view?usp=sharing Anyways thanks :) – squiroid Aug 19 '17 at 05:19
  • You can do it locally by reassembling resources.pak in chrome installation directory (on each browser update) using [grit](https://stackoverflow.com/questions/34478264/how-to-open-unpack-the-resources-pak-file-of-google-chrome). – wOxxOm Aug 19 '17 at 05:26
  • 1
    @wOxxOm, Did the Chrome team mention a reason for this yet-another-weird-bug? If our chrome extension is supposed to run when the user is offline, and we inject code into our own `mysite.com`, that extension becomes unusable if the user is offline... sort of defeats the purpose. – Pacerier Oct 12 '17 at 10:15
  • Btw is there any way to change the user setting for `Offline Auto-Reload Mode` and `Only Auto-Reload Visible Tabs` in about:flags? – Pacerier Oct 12 '17 at 11:25