I am working on a Chrome extension that needs to inject scripts into data:-URI pages.
When trying to execute the javascript I get an exception:
Error during tabs.executeScript: Cannot access contents of url "data:text/html;charset=utf-8, … ". Extension manifest must request permission to access this host.
But which permission would work for me? I tried data:*, <all_urls>, *://*/* - none of these worked. Also the activeTab permission did not do the trick. Any ideas?
It's currently a chromium bug that extensions cannot work on data URIs. A fix is going in that will rectify this, hopefully landing in Chrome 66.
Related
From administrator panel I can't find my plugin css or js file. In console log it's showing :
Failed to load resource: the server responded with a status of 403
(Forbidden)
Now when I access this file from console login the browser showing me following message :
Forbidden
You don't have permission to access /plugins/system/helix3/assets/css/bootstrap.css on this server.
Server unable to read htaccess file, denying access to be safe
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Can you guys tell me how can I solve this problem. For this error my plugin is not correctly displaying :(
Thank You.
There is little information you give about your problem, but I will try to help you the same. I had a similar problem and with some research I was able to figure out what my problem was.
First check if file exist /plugins/system/helix3/assets/css/bootstrap.css
Second check the access permissions of your /plugins/system/helix3/assets/css/bootstrap.css in joomla and in the folder permission.
Third check if the css you are using does not need anything else to work. Example in mine was a problem with a plugin for firefox.
Sorry for my English but this is not my native language.
When you're writing the manifest.json file, you have to specify matches for your content scripts. The http and https work fine, but if I try to include chrome://*/* or any variant of it, I get an error that I'm attempting to use an invalid scheme for my matches.
Is it not allowed?
By default you cannot run on a chrome:// url page.
However, there is an option in chrome://flags/#extensions-on-chrome-urls:
Extensions on chrome:// URLs (Mac, Windows, Linux, Chrome OS, Android)
Enables running extensions on chrome:// URLs, where extensions explicitly request this permission.
You still have to specify pages that your extension can run on and wildcards are not accepted - so you have to specify the full URL eg chrome://extensions/
The authorized schemes for matches are http, https, file, ftp.
Therefore, chrome is not a valid scheme.
Yes, it is not allowed. You can't link to them from hrefs on a webpage either.
I need to use the Hubspot tracking code into a Chrome Extension but I have some problems related with the Chrome URI protocol because it uses chrome:// instead http(s)://
These are the steps I follow so far:
Replace the src to force https: https://js.hs-analytics.net/analytics/
Add the domain to the manifest.json
But when the script runs, it tries to download resources from a relative url which turns into chrome://track.hubspot.com and fails.
Does exist any way to modify this behaviour without having to download the file and modify it?
We have a RDP link on our website, which works great in IE (prompts download for the user as it should). However, if a user attempts to access the link in Chrome or FireFox, the file content is displayed instead of forcing download.
I've added proper content-type and content-disposition headers and also added the mime types within HTACCESS (AddType application/x-rdp rdp), but have had no luck forcing the download. Any suggestions?
Download link: http://www.drivecms.com/uploads/city-commercial.com/2100236394CityCom%20TS01.RDP
An AllowOverride directive somewhere in your web server’s configuration, or in the .htaccess file of a parent directory might prevent you from changing MIME types via htaccess files.
One of my friend's site's users getting this error.
Oops! This link appears to be broken in Google Chrome
http://www.labnol.org/software/webpages-not-opening-in-google-chrome/13041/
Can he do something with their hosting to ensure users of his site will not get this error.
As it is a browser bug, you cannot change this behaviour.
well: as the bug only occurs if prefetching links from your page fails, you could of course remove all 'href' attributes from your html-source and add them on page load using javascript. this would end in chrome not fetching up anything: no fetching => no fetching error. but this 'solution' is not practical.
Are you using redirects? Cause chrome wants a status header with that.