google-chrome-app

Chrome App SecurityError on file creation

こ雲淡風輕ζ 提交于 2019-12-22 05:04:15
问题 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

How to display data URI for PDF in Chrome App?

牧云@^-^@ 提交于 2019-12-21 21:43:02
问题 I have a data URI generated from a JavaScript PDF library (jsPDF) that seems to be OK, because when I display it with console.log and paste it into a browser URL field, it works. However, I can't get it to display from within the Chrome App, either in a Chrome App window or an ordinary browser window. The URI starts like this: var uri = "data:application/pdf;base64,JVBERi0xLjMK ..."; When I do this: chrome.app.window.create(uri); The window opens, but it is trying to load the URI: chrome

Can't get NaCl C++ module to load file from within packaged app

牧云@^-^@ 提交于 2019-12-21 16:56:51
问题 I have a chrome packaged app that also includes a PNaCl/NaCl C++ module, as well as some data files which the NaCl module needs to read in. However, I am not able to get it to read in the files. I set it up according to all the documentation and official examples that I could find, as well as the answer to: How to include a data file in a chrome app for a native client module to read The nacl_io demo that comes with the SDK is able to do this, but it is in C, not C++. I came up with a simple

Proper way to listen as TCP server in Chrome extension

泄露秘密 提交于 2019-12-21 11:26:09
问题 I want to create a TCP server and listen on it. I need access to the tab content, so I need a chrome extension. Sadly, only chrome apps can create TCP servers. Is it a valid/good concept to create a TCP server in a chrome app and let the app communicate with an extension (is this even possible?)? If not, what would be my alternatives? The only idea I have is to change from server model to client model and let the extension connect to an external server. This solution would be poor in my

SSL Client Authentication with Certificate in Chrome App

我们两清 提交于 2019-12-21 05:48:10
问题 I'm writing a Chrome app that needs to have an SSL socket with client authentication. I have done this before in Java with the same set of trust store and key store. Here is what I have done on Chrome (Mac and Chromebook): Add client key (p12) and CA (one root CA, one intermediate CA) to system. In Chrome app, try both the legacy socket API and the new sockets.tcp API. Always receiving error ERR_SSL_CLIENT_AUTH_CERT_NEEDED . But I think I already have the correct client cert and CA in the

Postman chrome extension with array of hashes as value

柔情痞子 提交于 2019-12-21 04:56:17
问题 I have a data that looks like this: I took a look at this post Array value on postman chrome extension, so I know how to use postman to send post request with parameters from age to skillset , my problem is the work_experience , it's an array of hashes, I want to input the work_experience in postman, from which you can see is an array of hashes. So is this possible? And if you know a better chrome extension that can do this, feel free to answer or comment P.S. Although this is should be

How can I make a chrome packaged app which runs in fullscreen at startup?

你。 提交于 2019-12-21 04:01:11
问题 Currently it seems that the fullscreen ability can only be activated from a user action (mouse/keyboard event). Is there a way to circumvent this? 回答1: Now, you can just add the state:"fullscreen" property on your main .js: chrome.app.runtime.onLaunched.addListener( function() { chrome.app.window.create('index.html', { state: "fullscreen", } ); } ); Make sure you don't add resizable: false or bounds properties, and you add a "fullscreen" permision on the manifest.json . { ... "permissions": [

Universal path to chrome.exe

天大地大妈咪最大 提交于 2019-12-20 11:13:51
问题 I am making an application and I want to make it installable on the user's desktops using chrome URL shortcut. Therefore, is there a universal path to the chrome.exe that can launch my app on all Windows versions ( XP, Seven and vista ) 回答1: Chrome installs by default to the User's AppData Local folder: XP: C:\Documents and Settings\UserName\Local Settings\Application Data\Google\Chrome Vista: C:\Users\UserName\AppDataLocal\Google\Chrome Windows 7: C:\Program Files (x86)\Google\Application

Chrome contextMenus API ContextType

天大地大妈咪最大 提交于 2019-12-20 10:42:08
问题 I am looking at the API for chrome.contextMenu here. The context types listed are: "all" "page" "frame" "selection" "link" "editable" "image" "video" "audio" "launcher" "browser_action" "page_action" Some of these are intuitive, the others not so much. Where can I find definitions for these different contexts? It is hard to make use of the api without this background knowledge. Specifically, I would like to know "page", "frame", "editable", and "launcher". 回答1: "link", "image", "video",

chrome.identity.getAuthToken not working

坚强是说给别人听的谎言 提交于 2019-12-20 09:56:25
问题 I am working with Chrome Identity API, to provide users with a Google Authentication on my Chrome Extension. I followed the official tutorial of Google : link Chrome Identity API i added permissions to manifest.json and Client ID and Scopes to trigger the Authentification i added this code in my Background.js chrome.identity.getAuthToken The problem is when i execute the extension i am redirected to this login page chrome://chrome-signin/?source=5 but after a successfull authentication i am