google-chrome-app

Content-Security-Policy error https://ssl.gstatic.com

空扰寡人 提交于 2019-12-23 17:12:12
问题 I am getting an error as captured in the screenshot below: It reads: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "default-src file: data: chrome-extension: https://ssl.gstatic.com". Note that 'script-src' was not explicitly set, so 'default-src' is used as a fallback. What am I doing wrong and how can I resolve the Content-Security-Policy error? Below is my meta-tag in, in my index.html

How to clear error list of chrome app?

早过忘川 提交于 2019-12-23 12:54:05
问题 First introduction to chrome apps. I'm trying to get some sort of workflow down. I've enabled the checkbox to collect errors, but can not seem to clear them between executions of the app. I assumed closing the app them re launching it would do the trick. The only thing that works right now is deleting the app then reloading the package. 回答1: To clear the list of errors at "Collect errors": Toggle the "Developer mode" checkbox (disable, then re-enable). Click on the Reload link (reload

How to open a Chrome Packaged App with a parameter on Windows?

时光毁灭记忆、已成空白 提交于 2019-12-23 02:49:06
问题 I'm trying to create a file handler on my app, I've not Chrome OS so the only way to try my code is to launch the app from command line with a file in parameter. My question is: how? I've tried chrome --appid=[TheIdOfMyApp] --[Path of the file to open] but it just opens the app and the entry from my function is the same as when I open Mado with no parameters. To check if I have an entry I do that : chrome.app.runtime.onLaunched.addListener(function(items) { console.log(items); // The code to

How to open chrome app in same page rather than popup window?

房东的猫 提交于 2019-12-23 02:47:14
问题 I am trying to read data from serial device arduino (serial monitor). But I dont want app to open in new window. It should open in chrome tab. //manifest.json { "manifest_version": 2, "name": "Serial Monitor", "description": "Monitors your serial port and allows you to read and write to it like you could with Arduino's IDE.", "version": "1.0.4", "app": { "background": { "scripts": ["background.js"] } }, "icons": { "16": "extentionAssets/icon-16x16.jpeg", "128": "extentionAssets/icon-128x128

GWT Chrome Extension with manifest_version: 2

半腔热情 提交于 2019-12-22 14:15:44
问题 Has any one been able to make a Chrome extension using GWT and manifest_version 2? I have sandboxed all the GWT generated files also (as suggested here) but it still does not work. manifest.json { "name": "Hello World!", "description": "My first packaged app.", "manifest_version": 2, "version": "0.1", "app": { "background": { "scripts": ["background.js"] } }, "permissions": ["experimental", "appWindow"], "icons": { "16": "calculator-16.png", "128": "calculator-128.png" } } background.js

Do mobile chrome apps run in chrome?

本小妞迷上赌 提交于 2019-12-22 08:23:27
问题 To put it bluntly, do Mobile Chrome Apps have anything to do with chrome at all? After all, it seems reasonable to expect that as it has Chrome in the name. This question stems from the fact that as I was porting my 'chrome based mobile app' (which does not run in the 'Browser'), I got a huge string of weird errors and for the first couple of hours I had no idea what was happening. NOTE: This question is out of date , Mobile Chrome apps now works differently as outlined in the edit section of

Maximum files of a directory that can be read by FileReader#readEntries in JavaScript

左心房为你撑大大i 提交于 2019-12-22 06:27:06
问题 I'm creating a Chrome application. I must read the files of a directory and I am using the DirectoryEntry API and DirectoryReader API. My problem is that the maximum files read using DirectoryReader#readEntries is 100, the first 100 (alphabetical order) var reader = currentDir.createReader(); var read = reader.readEntries.bind(reader, function(files) { for ( var i = 0; i < files.length; i++){ if (files[i].name == nameSearches){ callback(files[i]); } } }) callback(undefined) } read(); The

How to detect in JavaScript if a page was loaded in a Chrome webview?

吃可爱长大的小学妹 提交于 2019-12-22 06:08:12
问题 I'm writing a packaged app for Chrome that has a webview tag where I load my website. Is it possible for the website JavaScript code to detect that it was loaded in a webview? The navigator.userAgent property has no clues. 回答1: Other approaches in addition to the one mentioned by Jivings: Load a slightly different URL in the webview, e.g., http://example.com?in_webview=1, and reflect that in the JavaScript served by the site. Same idea but use a #fragment. I don't know for sure whether a

Chrome app Picasa identity: OAuth2 request failed: Service responded with error: 'bad client id: {0}'

爷,独闯天下 提交于 2019-12-22 05:26:10
问题 I'm trying to authorize with chrome.identity.getAuthToken() to get token for Picasa web service. I couldn't find Picasa API in Google Developer Console and set its scope to "https://picasaweb.google.com/data/" oauth2 part of manifest.json. Picasa docs say that I can skip this step. chrome.identity.getAuthToken({ interactive: true }, function (token) { if (chrome.runtime.lastError) { console.error(chrome.runtime.lastError); } else { console.log(token); } }); getAuthToken() always ends with an

Chrome App SecurityError on file creation

女生的网名这么多〃 提交于 2019-12-22 05:04:24
问题 I have the following code: chrome.runtime.getPackageDirectoryEntry(function(directoryEntry) { directoryEntry.getFile("files/test.txt", {create: true, exclusive: false}, function(fileEntry) { console.log(fileEntry); }, function(error) { console.log(error); }); }); If the file does not exist and create is true I get an It was determined that certain files are unsafe for access within a Web application, or that too many calls are being made on file resources. error. But if it does exist and