google-chrome-extension

Invisible tabs in chrome extension

青春壹個敷衍的年華 提交于 2019-12-18 12:08:42
问题 I basically want to automate a website by using a Chrome extension. But this website has extremely much client-side code, so it's really hard to find out which request I need to make in order to get the needed information. The easiest way I can think of would be to use a content script to enter text in input elements and click buttons, like this (with jQuery in this case): $.ready(function(){ $("#input").val("foo"); $("#submit").click(); }); Quite similar to this question: Injecting input

Is there any way to use c++ in chrome extension?

前提是你 提交于 2019-12-18 12:07:59
问题 Is it possible to use c++ binary in chrome extension ? 回答1: Yes, like with other browsers, you can write a NPAPI plugin that will comunicate with your extension. See the related Google page at code.google.com And a more generic description at wikipedia 回答2: NPAPI was deprecated from Chrome/Opera for security concerns. You can still use NPAPI if you are targeting firefox, but if Firefox follows the trend it might disable it at some point as well. The better options you have today are Use NaCl

How can I make a Chrome extension automatically click a button when a page loads?

此生再无相见时 提交于 2019-12-18 12:02:34
问题 I'm trying to create a Google Chrome extension that presses a button on page load. I've been able to trigger the button using VBscript for Internet Explorer by using this code: IE.Navigate("javascript:changeIframe();") But, now I need to do it in Google Chrome via an extension. However, the button does not have an id: <input type="button" value="Start!" onclick="javascript:changeIframe();"> and here's what I've tried so far and nothing seems to work: window.onload="javascript:changeIframe()";

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.Storage.Local Persistence

空扰寡人 提交于 2019-12-18 11:35:18
问题 all. I've started developing small extensions using Chrome's various API's, and although things are working great, I'm still curious about a few things. Two questions, if you all wouldn't mind helping me out: 1. Could someone tell me what the limits are to chrome.storage.local's persistence? I've tried various tests on my own, such as storing a few things with chrome.storage.local.set(), clearing all of my browser history, cookies, etc. and then seeing if everything is still there. Often it

Keyboard Shortcuts in Google Chrome / Chromium Extensions

旧城冷巷雨未停 提交于 2019-12-18 11:34:27
问题 I've created a basic extension for Google Chrome to change the behavior of which tab is selected when you close a tab so that the selected tab is the last one you had selected instead of just the one before the tab you closed. I want to add keyboard shortcuts, and I've found a way to do that using jquery and jquery hotkeys, but the problem I'm finding is that the keyboard shortcuts only work once a page is loaded. So for example, if you open a new tab without going anywhere, the shortcut keys

Message Passing Example From Chrome Extensions

余生颓废 提交于 2019-12-18 11:34:10
问题 I'm using the example from the Google tutorial and finding it difficult to pass a simple message to the content script from the popup. Can you provide some suggestions on how to pass a simple message and view it either in the console log or alert? manifest.json { "manifest_version": 2, "name": "msg-test", "description": "message test", "version": "1.0", "browser_action": { "default_icon": "icon.png", "default_popup": "popup.html" }, "background": { "scripts": ["background.js"], "persistent":

Content Script tracking with Google Analytics

大兔子大兔子 提交于 2019-12-18 11:29:08
问题 I am working on a Google Chrome Extension that modifies certain pages with a content script. In order to understand when and where those changes are applied we were looking into google analytics since we use it for other web properties already. We include the ga.js library via the manifest file, and trigger _trackPageview with a synchronous page call when we apply a change to a page. var pageTracker = _gat._getTracker("UA-our-UA"); pageTracker._setDomainName("none"); pageTracker.

Access-Control-Allow-Origin on chrome extension

混江龙づ霸主 提交于 2019-12-18 11:27:31
问题 I'm making a Chrome extension which pulls data from my own server. It uses about 4 httpRequests at a time, but sometimes I get console error as follows: XMLHttpRequest cannot load http://apps.radionsm.lv/apps/system/index.php?request=now. Origin chrome-extension://egkddfmbidfobhchndockbhjancbpfkd is not allowed by Access-Control-Allow-Origin. for everyone sometimes no. If I send header('Access-Control-Allow-Origin: *'); will this fix it? 回答1: https://developer.chrome.com/extensions/xhr Read

How to export (dump) WebSQL data

半世苍凉 提交于 2019-12-18 11:15:10
问题 I'm working on a Chrome Extension that uses WebSQL to store historical data. Being WebSQL, the DB is stored on the client. I'd like to add an option to export/import such data so that the user can share/use this data with other users, or with other PCs. These are my first steps on a client-only database, so I wonder how to do this. I was thinking to convert the DB to a huge json string that the user can copy/paste but doesn't look very user-friendly. Is there any better solution? 回答1: I got a