google-chrome-extension

connection breaks after a while between native-app and chrome-extension

懵懂的女人 提交于 2019-12-22 09:12:03
问题 I am using chrome native messaging api to communicate between my chrome-extension and native-windows-app which is written in c++. The connection establishes finely and data also gets exchanged. But the connection breaks after random number of calls are made from extension to the native-app. I tried running native-app independently and it works fine when run in an infinite loop(no exceptions occur). My native-app generates almost 300KB of data at first call( encode_frame() ) and then

Avoid dynamically injecting the same script multiple times when using chrome.tabs.executeScript(…)

南笙酒味 提交于 2019-12-22 08:59:34
问题 I'm building a Google Chrome extension. The basic setup is I have a Browser action button that injects jQuery and another bit of JavaScript into the active tab when it is clicked to do it's thing. This is my first Chrome extension, but it seems like if the user clicks the button to take action a second time the scripts will be re-injected. This is a problem because the main pages this is going to work with are all AJAX, so the page content changes significantly but the actual page URL never

Facebook JavaScript API for google chrome extension

╄→гoц情女王★ 提交于 2019-12-22 08:25:38
问题 I make a chrome extension to like specific page posts automatically. With a simple popup controller and background thread to handle fb api interactive I cannot load facebook js api into extension page with official example method. The script jssdk was loaded and executed checked by chrome developer tools. But window.FB is not defined by script loaded!!! I also add script tag manually. It appeared both background thread and popup window. If inject with iframe to load page, it will success

Call pdfium (chrome native pdf viewer) from javascript

半腔热情 提交于 2019-12-22 08:06:43
问题 I am aware that pdfium exposes a javascript API (see this question). But I can't find how to call those functions. On a page with a rendered PDF I can see an embed tag, but I don't know what to do with it. var p = document.getElementsByTagName('embed')[0] Gives me this: function anonymous() __proto__: Object <function scope> And in the source code of the Chrome extension, there is this function in pdf.js: /** * Handle a scripting message from outside the extension (typically sent by *

Load the Google File picker in a chrome extension

∥☆過路亽.° 提交于 2019-12-22 07:00:09
问题 I'm working on a Chrome extension and I would like to load the Google File picker. I have included the JS API script in my extension (I include it directly in the package). When I try to load the picker: google.setOnLoadCallback(function() { var picker, view; view = new google.picker.View(google.picker.ViewId.DOCS); view.setMimeTypes("application/vnd.unishared.document"); picker = new google.picker.PickerBuilder().setAppId(...").addView(view).setCallback(function() {}).build(); return picker

angularjs templates in chrome extension

大城市里の小女人 提交于 2019-12-22 06:56:15
问题 I am running into a strange issue while using angularjs template in a content script based chrome extension. I go in an infinite loop. When I use an inline template (using template attribute with a string), it works fine. Can anybody suggest what I am doing wrong? manifest.json { "name": "Content Script Cross-Domain XMLHttpRequest Example", "version": "2.0.0", "manifest_version": 2, "description": "Demonstrates making cross domain requests from a content script by putting Twitter trends on

Unable to view content script references in the developer tools window

大城市里の小女人 提交于 2019-12-22 06:49:26
问题 When I view my extension with the developer tools, I only see the generated background file, background.js; my content script doesn't appear under the content scripts tab. Any ideas why? The relevant part of the manifest looks like this: "content_scripts": [{ "run_at": "document_end", "js": ["postMsg.js"], "matches": ["https://groups.google.com/forum/*"] }], postMsg.js gets injected into the page, but never appears in the developer tool window, so I'm unable to debug it. 回答1: As long as you

Cross Origin Chrome Extension

孤者浪人 提交于 2019-12-22 06:38:05
问题 I have been reading and playing around with Chrome Extensions for the last week or so but I'm having trouble trying to achieve what I want. What I am trying to create is an Extension that in the background (or silently) visits a website fills out a form on the web page and retrieves the response. The website doesn't have an API and I can't create a server to do this as the website only allows X requests per IP per hour so my requests would be exhausted after a few users. So my idea was to

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

Error: EACCES, permission denied even after using sudo?

时光总嘲笑我的痴心妄想 提交于 2019-12-22 06:10:48
问题 I am trying to set up a chrome extension that will automatically save the changes I make to my website with the inspect element feature. The idea is that you'll be able to make real time changes to the website without having to go back into the ide to save the changes and re-upload and everything. The extension is called DevTools Autosave. I've been following the instructions from this site. I'm trying to install this on a mac. I've installed node.js and the extension already. When I got to