I am trying to create an application that downloads a website and then adds some custom CSS to configure it on a mobile device.
I am using window.open to load the page successfully, and I have a callback on loadstop where I call browser.insertCSS, this is where the problem is.
If I do something like this:
browser.insertCSS({code:"body{background-color:red;}");
The style is applied correctly. However, if I do this:
browser.insertCSS({file:"mobile-style.css");
And add the same CSS to the file, it does not load
I tried different paths (putting the file in the www folder, in the css folder, in the same folder as the JS file, and referring to it using "./mobile-style.css", "mobile-style". Css ", "/ www / mobile -style.css", "/ mobile -style.css", but none of them seem to be loading the file correctly.
, insertCSS(), ?, , ( , ).
.