google-chrome-app

How to Add jQuery Plugin to Chrome Extension Manifest.json

那年仲夏 提交于 2019-12-25 02:48:12
问题 Can you please let me know how I can add a jQuery plugin into a Google Chrome extension manifest.json file? { "manifest_version": 2, "name": "One Pass", "description": "This is a Development.", "version": "1.0", "browser_action": { "default_icon": "icon.png", "default_popup": "popup.html" }, "permissions": [ "https://secure.flickr.com/" ] } Thanks, 回答1: You would need to add it as a content script. It's very well documented in the chrome : http://developer.chrome.com/extensions/tut_migration

Google Closure and Chrome packaged apps: compatibility?

*爱你&永不变心* 提交于 2019-12-25 01:44:35
问题 I am using Google Closure and and I am trying to make a Chrome packaged app. My call to goog.require causes an error: Uncaught document.write() is not available in packaged apps. The culprit is in base.js goog.writeScriptTag_ = function(src) { if (goog.inHtmlDocument_()) { var doc = goog.global.document; // If the user tries to require a new symbol after document load, // something has gone terribly wrong. Doing a document.write would // wipe out the page. if (doc.readyState == 'complete') {

webview.request access to requests initiated by the service worker

断了今生、忘了曾经 提交于 2019-12-25 01:40:51
问题 In a Chrome App I am able to access requests made by the <webview> and I am able to redirect if needed. The problem is the web app rendered inside the <webview> tag registers a service worker and lots of requests are handled by the service worker. Based on my tests the onBeforeRequest won't be notified. It works if I unregister the service worker, though. webview.request.onBeforeRequest.addListener( this.handleRequest, {urls: [pattern], types: ["image"]}, ["blocking"] ); So, is this a bug? or

Custom Extensions on Managed Chromebooks

怎甘沉沦 提交于 2019-12-24 16:32:21
问题 I am a developer looking for the best way to set up different schools with their own custom, private extensions (ie School A should be the only one with access to Extension A). Theoretically, I am aware that there are a few ways to get a custom, private extension pushed out on a domain: Host the .crx on a server and click "Specify a Custom App" in the management console. Create a Domain App by uploading a zip to the Chrome Web Store Upload the extension from my developer account to the Chrome

Chrome app eval()

时光怂恿深爱的人放手 提交于 2019-12-24 11:32:24
问题 I am trying to create a simple calculator for chrome. I need to use eval() to evaluate the expression,but it is banned by chrome. Any workarounds? Here is the js. Can anyone give a solution to this? I have looked everywhere. var text = document.getElementById("tBox"); var x = 0; var y = 0; var op = ""; var resetFlag = 0; document.getElementById("buttonbackspace").addEventListener("click",function(){backspace()}); document.getElementById("buttonone").addEventListener("click",function()

Chrome app - how to reboot app?

半世苍凉 提交于 2019-12-24 10:46:10
问题 I am creating a Chrome app and I have made a Logout button in the app. How can I restart/reset the app? (background.js / background page should be restarted) 回答1: chrome.runtime API is your friend. chrome.runtime.reload() Reloads the app or extension. Note that this will probably close all windows opened by the app. 回答2: Thinking about the user experience I'm not sure if chrome.runtime.reload() is the best what you can do. It is far much better if you just create a some king of cleanup

chrome.bluetooth.write error? IOReturn code: 3758097088

匆匆过客 提交于 2019-12-24 07:45:55
问题 I'm working on a simple chrome web store app that uses a new API called chrome.bluetooth . The API is rather new and only available to the google chrome dev channel. I have managed to discover all devices, search through their services and if they have the service I need to connect, it establishes a connection. My chrome.bluetooth.onConnection function works fine, it returns a socket which I am attempting to write to: chrome.bluetooth.onConnection.addListener(function(socket){ log("Connected"

How to display html file stored in local PC from chrome app?

人盡茶涼 提交于 2019-12-24 06:04:57
问题 I want to display a html file stored in local PC in another HTML. How do I do that? I tried using iframes and giving file:/// protocol. It gives me Not allowed to load local resource: error. 回答1: In a Chrome App, to access local files / folders you need to use the chrome.fileSystem API and get the user to select the file/folder for you (works as access approval that you can retain for later). You can't use file:/// from a Chrome App. 来源: https://stackoverflow.com/questions/37029737/how-to

Where to go when Chrome Packaged Apps are no more

◇◆丶佛笑我妖孽 提交于 2019-12-24 06:04:50
问题 I have developed and regularly use a chrome packaged app (written in HTML,CSS,Javascript) that takes a set of local javascript files in a local folder on my machine and minifies them (as a group) and writes the new minified files (one per original source file) to my local disk, overwriting any previous minified files if they exist. Google have now announced that they are discontinuing support for Chrome Packaged Apps from 2017 and suggest that developers migrate their app to the web. This

Which files to keep under source control for google-chrome-app?

对着背影说爱祢 提交于 2019-12-24 04:47:11
问题 https://github.com/MobileChromeApps/mobile-chrome-apps allows Chrome Apps to work on mobile. Their getting started wiki is really good to get things working but it generates a lot of files with absolute paths. Nothing is said about which files to keep under source control. At the moment I'm using each build: $ cca create YourApp --link-to=path/to/manifest.json which seems just wrong (for example the config.xml is lost). 回答1: TLDR; www/ is by far the most important. For the rest, just control