google-chrome-app

Chrome Web App webview height issue

[亡魂溺海] 提交于 2019-12-19 07:46:06
问题 I'm new in Chrome Web App programming. I want a simple WebApp which is separated to my Chrome/Chromium (means no tab). It shall show a external website in the body. So here is my configuration: manifest.json { "name": "Hello World!", "description": "My first Chrome App.", "version": "0.1", "manifest_version": 2, "permissions": [ "webview" ], "icons": { "128": "icon_128.png" }, "app": { "background": { "scripts": ["background.js"] } } } background.js chrome.app.runtime.onLaunched.addListener

Accessing cookies from a chrome app

老子叫甜甜 提交于 2019-12-18 15:54:40
问题 I can see that when I issue an xhr from my chrome app that it sends some cookies, and these cookies are kept track of in the app. Servers sending set-cookie headers are updating them correctly. I need to read a cookie though, and I tried using the "cookies" permission but chrome yelled at me... Is there another api I can use? edit: I am using the new packaged apps. 回答1: Cookies is apparently a dark area of Chrome Packaged Apps. With Extensions, the extension shares the cookie jar with normal

Can an app or extension open files on system with permission “<all_urls>”?

╄→尐↘猪︶ㄣ 提交于 2019-12-18 13:37:58
问题 I thought Chrome apps were sandboxed, but I see that you can allow permissions for file:// urls, and there's a special matching pattern: <all_urls> Matches any URL that uses a permitted scheme. (See the beginning of this section for the list of permitted schemes.) Are the file urls restricted to within the sandbox or can it really go anywhere? 回答1: Yes, you can access the entire filesystem (subject to the permissions of the user account running Chrome). However , the user must explicitly

Chrome Packaged app, Always on top window

喜你入骨 提交于 2019-12-18 12:09:20
问题 i am writing a text editor, i need the app window be always on top when switching to browser or e-book reader software. as i know ,for windows users, chrome doesn't provide any solution. is there any parameter to send when creating window to make window always on top? or can i provide any button in app to turn this feature on or off? Code i use to create window in bg.js: var launch = function () { chrome.app.window.create('index.html', { type: 'shell', width: 440, height: 680, minWidth: 440,

Chrome Packaged app, Always on top window

ぐ巨炮叔叔 提交于 2019-12-18 12:09:14
问题 i am writing a text editor, i need the app window be always on top when switching to browser or e-book reader software. as i know ,for windows users, chrome doesn't provide any solution. is there any parameter to send when creating window to make window always on top? or can i provide any button in app to turn this feature on or off? Code i use to create window in bg.js: var launch = function () { chrome.app.window.create('index.html', { type: 'shell', width: 440, height: 680, minWidth: 440,

Chrome extension: how to use serial port (now that apps are sunsetting)?

房东的猫 提交于 2019-12-18 11:56:20
问题 Aim : I am attempting to write a little "thing" that can talk from my browser to the COM port of an Arduino. Issue : My first attempt is to write an extension. Therefore I am requesting permission for serial in my manifest file. When loading the unpackaged extension via developer mode I receive the following error: 'serial' is only allowed for packaged apps, but this is a extension. I see here that packaged app is an outdated term and I guess they just mean Chrome app . Now unfortunately it

Chrome extension message being passed as object

a 夏天 提交于 2019-12-18 09:44:45
问题 I'm sending a message from the content script to the background page. The message is a URL which then gets ajax parsed in the background. When I console.log the data retrieved into background.js the console log is pure html, but when I send the message back to my content script the message is suddenly in an object, and I'm not sure why. Here is my code: Content_Script.js: chrome.runtime.sendMessage({greeting: URL}, function(response) { console.log(response.farewell); //logs an object: Object

Chrome extension in app purchase always returns PURCHASE_CANCELED, even if the purchase worked

喜欢而已 提交于 2019-12-18 08:25:24
问题 This question is related to the one at Chrome Webstore Extension In App Purchase INTERNAL_SERVER_ERROR. I first posted my question there in the form of a comment, but received feedback that this was more appropriate as a separate question. Like the OP, I am using buy.js and following the recommended workflow for in-app purchases in the Chrome extension. But my results are somewhat different: when I complete the IAP buy dialog, I get back a PURCHASE_CANCELED, even though I bought the IAP. If I

Chrome extension in app purchase always returns PURCHASE_CANCELED, even if the purchase worked

谁说我不能喝 提交于 2019-12-18 08:25:23
问题 This question is related to the one at Chrome Webstore Extension In App Purchase INTERNAL_SERVER_ERROR. I first posted my question there in the form of a comment, but received feedback that this was more appropriate as a separate question. Like the OP, I am using buy.js and following the recommended workflow for in-app purchases in the Chrome extension. But my results are somewhat different: when I complete the IAP buy dialog, I get back a PURCHASE_CANCELED, even though I bought the IAP. If I

Reasons for porting a Cordova App to a Mobile Chrome App?

匆匆过客 提交于 2019-12-18 03:11:22
问题 We got a Cordova App running and wrote ourselves a build script using Grunt which makes building the App a breeze. We don't require any of the APIs Chrome offers and are, apart from some performance issues with elderly Android devices which forced us to block some minor features on those devices, pretty much satisfied with the current status of our app. So far we couldn't find any reason why it would make sense to transform our Cordova App into a Mobile Chrome App. Or is there something we're