Short-cut for moz-extension:// and chrome-extension:// - google-chrome

background-image:url(chrome-extension://__MSG_##extension_id__/image.png);
For an extension that works for Firefox and Chrome, I just need to refer to a single image file in a CSS file.
chrome-extension:// works only for Chrome
moz-extension:// works only for Firefox
So I am stuck to create 2 separate CSS files just for single line of code.
Is there any short-cut for both of protocols?
Relative paths does not work for Chrome. Rather than searching in the root directory of the extension, Chrome searches the image file in web site root directory.

Related

How can I browse a local html site?

I'm running into two issues trying to browse a local html site on firefox for testing:
When I try to make a link to the root (href="/"), firefox shows the macos root directory on a file browser
When I go to a directory, firefox shows a file browser rather than opening index.html
This seems to be fixed by uploading the site to the internet, but I'd like to be able to test the site locally without uploading it

When I try to open .html file in chrome it ocassionally open repository

it divide my html file on 2 different files 1)is repository 2)is just some loading page
same error with pdf files but it divides on 3 files
It works in Firefox.
Google Chrome is set to be my main browser.
Maybe the version of chrome that you use don't support what you're doing but its just my random guess , you can try to use live server of some IDE like VScode and see if the problem persist.

Auto-open HTML file from Chrome to another browser

On downloading a file in Chrome, there does not seem to be a way to auto-open HTML files to a browser other than Chrome.
Opening the HTML file from the Downloads folder opens the file in the default browser, as intended. However, when Chrome auto-opens the downloaded file, it just opens in Chrome.
Why I'm asking: I built a Chrome extension that generates an HTML file based on user-selected text in a given webpage. The resulting HTML file, when opened, redirects to another website, to a page that is based on the user's selection. That page does not work properly in Chrome, and it won't for the next 6 months. In the meantime, I learned to program a Chrome extension and I have been blocked on this auto-open problem for 2 weeks.
On Windows 7 without admin privileges.

Mozilla unable to display images whereas IE does

Could anyone tell me why mozilla firefox unable to display the images where explorer can do? I even changed the extension with CAPs in all ways i can but not yet working. I have written a HTML file and my IE can open in the way i want but when i open my HTML file using the mozilla it is not displaying images but just leaving the image borders.
And also IE can reference to the CSS sheet path and making the changes but wheareas the mozilla its unable to link with css sheet path I have set the text color and font size in my css sheet and linked it with my html file. Its working perfect in IExplorer but not with the mozilla. I have been asking these thing How do i make a standard HTMl file that works on every browser And i got some answers from you but still I am unable to make it work .Can anyone tell me a good document to go through because no matter how i try its working on one browser and throwing the error on some other browser
Im giving it as src="d:\text\image.png"
If you are using absolute paths with drive letters, e.g. <img src="C:\www\images\foo.png" alt="foo">, it will work with Internet Explorer but not with Firefox. If you include drive-letters etc. in the path, the path becomes Windows specific, something that IE can understand but other browsers may not.
To fix the problem, you should use relative paths, e.g. <img src="images\foo.png" alt="foo">. The path should be relative to the HTML file where this code is present.
Most often, web pages are written to be hosted on web servers. Images are usually put under an 'images' directory inside the document root (web-root), say, /images/foo.png. Now, the home page at /index.html can include this image either using a relative path: <img src="images/foo.png" alt="foo"> or an absolute path (path from the document root): <img src="/images/foo.png" alt="foo">. Note the usage of forward-slash as opposed to back-slash. You should use forward-slash. Back-slash is very Windows specific and other browsers may not understand it.
The same applies for CSS or any other paths used in your HTML documents.
For me worked (for Mozilla Firefox v 26.0).
<img src="file///C:/User/MrBrown/www/images/foo.jpg">
Didn't worked:
<img src="C:\User\MrBrown\www\images\foo.jpg">
instead of specifying the path as src="d:\text\image.png"...
change the path as src="file:///D:/text/image.png"
if the folder name are having spaces.. then instead of spaces, write %20. or else open that image file in any of the web browser.. and copy the address from the address bar and paste that address as src path..
it will work for both Google chrome and firefox..

Open Jpg in morzila firefox using jsp link dynamicaly generated for image

How to open jpeg in jsp file using Mozila Firefox? It works in IE but can't run in Firefox by passing it's scr tag dynamicaly
It will say E:\stxavier\docs\7.jpg
e not protocol error
and without generate dynamic content it will see path like
e|\stxavier\docs\7.jpg
So I can't understand that meaning I also use this thing but my other link to pdf or avi file is lost
To link to a local file, like "E:\stxavier\docs\7.jpg" you should prepend the local path with "file:///".("file:///e:/stxavier/docs/7.jpg")
But even if you do this Firefox and Opera sometimes DO NOT ALLOW links to the local file system.
Sometimes it will work sometimes it will not, you just can not relly on links to local files.