google-chrome-extension

Cannot find namespace/name chrome

安稳与你 提交于 2020-05-13 05:02:48
问题 I'm trying out the Angular to develop google extension, but found that I can't reference the chrome object without generating the ERROR in E:/ChromeExtensions/.../node_modules/chrome-promise/chrome-promise.d.ts (2160,66): Cannot find namespace 'chrome'. or ERROR in E:/ChromeExtensions/.../src/app/chrome-tabs.servi ce.ts (14,7): Cannot find name 'chrome'. I have added chrome typings npm install --save @types/chrome but all it gave me was, just typings, but it doesnt resolves build errors. If

Cannot find namespace/name chrome

女生的网名这么多〃 提交于 2020-05-13 05:02:33
问题 I'm trying out the Angular to develop google extension, but found that I can't reference the chrome object without generating the ERROR in E:/ChromeExtensions/.../node_modules/chrome-promise/chrome-promise.d.ts (2160,66): Cannot find namespace 'chrome'. or ERROR in E:/ChromeExtensions/.../src/app/chrome-tabs.servi ce.ts (14,7): Cannot find name 'chrome'. I have added chrome typings npm install --save @types/chrome but all it gave me was, just typings, but it doesnt resolves build errors. If

Chrome Extension - Trigger events on content_scripts using JQuery

♀尐吖头ヾ 提交于 2020-05-12 20:00:27
问题 I wrote a Chrome Extension that automatically fills some registration forms. There are some select fields that need to be triggered on " change " event in order to start some Ajax calls. First I use JQuery attr or val to change the value of the select field, and than I use .trigger to invoke the "change" event, but this last one doesn't work. Example: I want to select the option that contains the word "London" and invoke the change element in order to start some operations of the native code

Chrome Extension - Trigger events on content_scripts using JQuery

痞子三分冷 提交于 2020-05-12 19:59:08
问题 I wrote a Chrome Extension that automatically fills some registration forms. There are some select fields that need to be triggered on " change " event in order to start some Ajax calls. First I use JQuery attr or val to change the value of the select field, and than I use .trigger to invoke the "change" event, but this last one doesn't work. Example: I want to select the option that contains the word "London" and invoke the change element in order to start some operations of the native code

How to trigger focus to the Google Chrome address bar (OmniBox)?

浪尽此生 提交于 2020-05-12 01:41:52
问题 I am making a Google Chrome extension that overrides the New Tab (the page that appears when the user opens a new tab or window). I want to trigger the focus on the Google's address bar on a button click. I've read the chrome.omnibox docs, but I haven't found a method that triggers its focus. Is there a trick how I can do that? 回答1: The answer is: No! I've tried a million workarounds and tricks, but nothing helped. My conclusion is that this action is considered to be a security (and privacy)

.crx file install in chrome

断了今生、忘了曾经 提交于 2020-05-09 18:07:46
问题 I have just created a very simple chrome extension and it works fine. But when I converted to .crx file and try to open it with chrome, nothing happens. my chrome browser version is 19.0.1081.2 dev-m. My extension uses jquery-1.4.2.min . I could not understand whats the problem? 回答1: Opening the debug console in Chrome, or even looking at the html source file (after it is loaded in the browser), make sure that all the paths there are valid (i.e. when you follow a link you get to it's content,

Chrome extension: load different content scripts

北战南征 提交于 2020-05-09 18:00:29
问题 I want to load a different content script depending on the page and tab that is currently selected. Right now, I have three content scripts. I want to use two of them for one page and the third one for another page. Belonging to page 1: content_script.js load_content_script.js Belonging to page2: newtab_content_script.js right now my manifest looks like this { "name": "A plugin for AdData express. Generate an instant excel document from the brands you check mark.", "version": "1.0",

“No matching signature” error on adding a chrome.webRequest listener

点点圈 提交于 2020-05-08 09:36:07
问题 I have this code: chrome.webRequest.onCompleted.addListener(function(details){ console.log(details); }); I'm trying to understand and use the chrome.webRequest API. I can't figure why the code isn't working, I just wanna give a try to the API by logging all the requests made by chrome. I've set the permissions in my manifest on these two patterns http://*/* and https://*/* but i will always get this error from my background script: Uncaught TypeError: No matching signature. Any help is

Filtering a specific bookmark folder item in chrome extension

非 Y 不嫁゛ 提交于 2020-05-08 05:57:36
问题 I need to obtain a specific bookmark group or folder "codebase" among many root folders present. Also, i need to display its sub folder or sub group under "codebase" into my Popup html form. From chrome docs, i believe below function can do the stuff, but it needs ID of the folder, how to obtain the ID ? chrome.bookmarks.getSubTree(string id, function callback) FYI, popup html form is externally controlled by a script, where i need to place the code for above requirement. Thanks for your time

How can a Chrome extension save many files to a user-specified directory?

杀马特。学长 韩版系。学妹 提交于 2020-05-03 02:57:25
问题 I'm working on a Chrome extension to be used as an internal tool. Its required behavior is: As a page action, enable an address bar icon when looking at certain intranet pages. when the user clicks the icon, identify all files of a certain media type (say, .jpg) on the page, and silently save them all to a directory on the user's local drive. This question has been asked before, but the answer then was "use NPAPI", and NPAPI is now derelict. So, what is the currently available way to achieve