How can I get access to the local chrome-urls to receive content from there? For example use an iframe for chrome://version or access the content directly with AJAX.
Any ideas? I tried the following permission:
{
"manifest_version": 2,
"app": {
"permissions": [
"chrome://*",
"chrome://version"
]
}
}
--> "Not allowed to load local resource"
I had a look at the possible permissions but didn't find anything that fits my expectation. https://developer.chrome.com/extensions/declare_permissions
Thanks a lot in advance
Nope, you can't access chrome:// URLs in an app.
It's indirectly possible in an extension through tabs API, but there's nothing for the moment that can allow an app to do that.
Related
I created an Azure Function App to send emails (uses service bus topics), and I have it working beautifully locally using their SDK/CLI tools, but when I publish it to Azure using the Visual Studio Publish options available, the function doesn't appear to run, there is no error, and the monitor shows "No Data Available". The only thing I can possibly think of is that perhaps the local.settings.json file which allows me to run the app locally needs to be manually entered some place into the function app?
Clicking Run next to function.json just tells me in the Logs "2017-12-01T16:59:21 Welcome, you are now connected to log-streaming service." no other information is presented. Also, I checked the topic and still have messages pending.
I have verified the files did publish successfully to the bin folder using Kudo, and the function.json (below) looks right to me. Does anyone have any ideas why this might not be triggered and isn't erroring? As a note, the function folder only has function.json in it, but up one level the bin folder and the dll shown in the json are there.
function.json:
{
"generatedBy": "Microsoft.NET.Sdk.Functions-1.0.0.0",
"configurationSource": "attributes",
"bindings": [
{
"type": "serviceBusTrigger",
"topicName": "topicemail-dev",
"subscriptionName": "subLowPriority",
"accessRights": "manage",
"name": "mySbMsg"
}
],
"disabled": false,
"scriptFile": "..\\bin\\Emailer.dll",
"entryPoint": "Emailer.Functions.LowEmail"
}
When deployed to Azure, Functions does not use local.settings.json. Instead, it reads values from the App Settings. All you need to do is add App Settings values for each of the properties you have in local.settings.json
For people with the same issue, but who still can't get it working with the selected answer, view Azure function implemented locally won't work in the cloud , it might help.
Im trying to develop my first chrome extension and am running into an issue. Firstly I am using the following boilerplate as a page action:
http://extensionizr.com/!#{"modules":["browser-mode","with-persistent-bg","no-bg","with-custom-options","no-override","inject-css","inject-js","jquerymin"],"boolean_perms":["contentSettings","cookies","notifications"],"match_ptrns":[]}
In the inject.js, it downloads a list of urls from a remote server, checks the current url and if it matches it should do something. I was going to use a notification but I guess the notification comes from the current page and not the extension. So if you start the notification it will say "Do you want to enable notifications for amazon". Then I moved on to changing the icon. I would prefer doing both eventually. However, when I try and set text with the following:
chrome.browserAction.setIcon({path: 'icons/icon128-x.png'});
However, this is what I get in the console.
Uncaught TypeError: Cannot read property 'setIcon' of undefined
Any ideas?
you can't access chrome.browserAction in content.js, according to chrome extension document Content Scripts
Additionally, content script can access the following chrome APIs directly:
i18n
storage
runtime:
connect
getManifest
getURL
id
onConnect
onMessage
sendMessage
Content scripts are unable to access other APIs directly.
The extension manifest needs a "browser_action" section before the chrome.browserAction API is available to it:
Register your browser action in the extension manifest like this:
{
"name": "My extension",
...
"browser_action": {
"default_icon": { // optional
"19": "images/icon19.png", // optional
"38": "images/icon38.png" // optional
},
"default_title": "Google Mail", // optional; shown in tooltip
"default_popup": "popup.html" // optional
},
...
}
(From https://developer.chrome.com/extensions/browserAction#manifest.)
Im getting images from GoogleDrive via files.list method, response looks like this:
items:[{
"title": "canon_eos_30D.CR2",
"fileExtension": "cr2",
"imageMediaMetadata": {
"width": 3504,
"height": 2336
}
}]
Everything is OK, but after I copied this image via GoogleDrive web interface response looks like this.
items:[{
"title": "Copy of canon_eos_30D.CR2",
"fileExtension": "cr2",
"imageMediaMetadata": {
"width": 0,
"height": 0
}
}]
imageMediaMetadata is not copied! (doesn't matter what jpg or cr2). Then I tried to copy image on machine and sync it via client — everything is OK.
Looks like imageMediaMetadata parsed during image import and this is GoogleDrive bug.
Is there any way to get this info to workaround this bug or is there any way to force metadata reparsing until this bug is there?
P.S.: JFYI: If I add properties field to filter to files.list method these broken metadata fields excluded from response.
This is a known issue with how image files are copied in the Drive UI. Copying image files via the Drive API doesn't have this issue. A workaround, if unpleasant one, is to download and re-upload the contents of the file, which will cause it to be re-scanned and the metadata to be populated.
Manifesto version 2 and his new content_security_policy is now necessary for chrome extension.
I read some docs about 'sandbox mode" which seems to be a workaround for inline javascripts, but I still have a big issue.
After some refactoring, I got the following error:
"Unsafe JavaScript attempt to access frame with URL chrome-extension://mafcgphdkdbjlngfndodameheehmfhac/eventpage.html from frame with URL chrome-extension://mafcgphdkdbjlngfndodameheehmfhac/DCE24DB153A80B735442BF97F168AE6C.cache.html. Domains, protocols and ports must match."
I can't understand why 2 files from the same extension doesn't have the same "Domains, protocols and ports"!
NB: Here is a part of my manifesto:
"permissions": [
"http://*/",
"tabs"
],
"background": {
"page": "eventpage.html",
"persistent": false
},
"sandbox": {
"pages": [
"sandbox.html",
"DCE24DB153A80B735442BF97F168AE6C.cache.html"
]
}
...
Sandboxed pages are allowed to bypass the extension's Content Security Policy in part because sandboxing forces them into a unique origin. They don't have access to the extension's special APIs, nor can they grab its data.
http://developer.chrome.com/trunk/extensions/sandboxingEval.html offers a description of the workflow we'd suggest you use with sandboxed pages. In short, you'll need to replace direct access between the frame and its parent with postMessage-based communication.
I'm trying to use text-to-speech in a Chrome app, but I'm getting an error when trying to load the app.
My manifest.json looks like this:
{
"name": "APPNAME",
"description": "DESCRIPTION",
"version": "3",
"app": {
"urls": ["APPURL"],
"launch": {"web_url": "APPURL"}
},
"icons": {"24": "icon24.png", "128": "icon128.png"},
"permissions": ["tts"]
}
The error I'm getting reads "Could not load extension from <PATH>. Access to permission 'tts' denied."
Removing the "app" part of the manifest seems to allow it to load without problems. That would make me think that TTS is limited to Chrome extensions, but the docs suggest otherwise. Changing the "tts" permission to the "cookies" permission results in the same error, but changing it to "clipboardRead" does not.
I'm attempting to load the app via: Tools > Extensions > Load unpacked extension, and I'm using Chrome 16 on Ubuntu 11.10.
Can anyone tell me what I'm doing wrong?
It turned out that some permissions are only available for extensions and packaged apps. I was trying to use tts with a webapp, which is unfortunately not available.
That said, the Web Speech API is now available, along with Speech Synthesis.