google-chrome-app

Communicating between a Chrome packaged app and a Chrome extension?

怎甘沉沦 提交于 2019-11-27 01:25:26
I need to combine functionality available only in a Chrome packaged app (access to syncFileSystem) and functionality available only in a Chrome extension (injecting a script into a 3rd party website). It seems that neither a packaged app nor an extension can achieve both these things, so I'm now considering trying to achieve what I'm after with a separate packaged app and extension communicating. I see that Chrome's documentation explains how two extensions can communicate via chrome.runtime.onMessageExternal.addListener and chrome.runtime.sendMessage , but nothing about packaged apps and

Is it possible to remove “Inspect Element”?

不想你离开。 提交于 2019-11-27 01:24:58
问题 Is it possible to remove or disable "Inspect Element" context menu in Chrome App via Javascript? I have searched through several forums but there are no definite answer. 回答1: It is possible to prevent the user from opening the context menu by right clicking like this (javascript): document.addEventListener('contextmenu', function(e) { e.preventDefault(); }); By listening to the contextmenu event and preventing the default behavior which is "showing the menu", the menu won't be shown. But the

Run chrome in fullscreen mode on Windows

我的未来我决定 提交于 2019-11-26 19:15:08
问题 I want to configure my computer to launch Google Chrome Windows start up. It should start in full screen mode and open some web page. I tried to run Chrome with the following command line: chrome.exe --start-fullscreen --app=https://google.com However Chrome opens in windowed mode, not in full screen mode. Is there any way to run chrome in full screen mode? 回答1: Update 03-Oct-19 new script that displays 10second countdown then launches chrome/chromiumn in fullscreen kiosk mode. more updates

Chrome App: Doing maths from a string

你。 提交于 2019-11-26 17:25:11
问题 I have a basic Chrome App that I'm building that constructs strings like this: "1 + 4 - 3 + -2" Seeing as you can't use eval() in Chrome Apps, how can I get the answer to a string like so? eg. If this was just a normal webpage I would use something like this: var question = { text: "1 + 4 - 3 + -2", answer: eval(this.text) } Is there any possible way of replacing eval() with something else to answer a string like question.text ? 回答1: Try modifying string to "+1 +4 -3 -2" utilizing String

How to change chrome packaged app id Or Why do we need key field in the manifest.json?

南楼画角 提交于 2019-11-26 11:11:24
I'm developing packaged app for chrome store using one-time chrome wallet payments. For my app I need to check during the runtime if user bought the app or not to decide should it be demo functionality or full functionality. According to the chrome identity API documentation : to keep application ID constant, You need to copy the key in the installed manifest.json to your source manifest. I have 2 questions about this procedure: 1) under what condition the id of my application may change? I've tried to re-install the app and made updates but the apps id remains the same.. If there is no way to

Communicating between a Chrome packaged app and a Chrome extension?

对着背影说爱祢 提交于 2019-11-26 09:39:33
问题 I need to combine functionality available only in a Chrome packaged app (access to syncFileSystem) and functionality available only in a Chrome extension (injecting a script into a 3rd party website). It seems that neither a packaged app nor an extension can achieve both these things, so I\'m now considering trying to achieve what I\'m after with a separate packaged app and extension communicating. I see that Chrome\'s documentation explains how two extensions can communicate via chrome

Chrome Extension Message passing: response not sent

我怕爱的太早我们不能终老 提交于 2019-11-25 22:17:22
问题 I am trying to pass messages between content script and the extension Here is what I have in content-script chrome.runtime.sendMessage({type: \"getUrls\"}, function(response) { console.log(response) }); And in the background script I have chrome.runtime.onMessage.addListener( function(request, sender, sendResponse) { if (request.type == \"getUrls\"){ getUrls(request, sender, sendResponse) } }); function getUrls(request, sender, sendResponse){ var resp = sendResponse; $.ajax({ url: \"http:/