google-chrome-extension

Intercept Javascript requests with Chrome extension

旧巷老猫 提交于 2019-12-22 01:00:06
问题 I want to write a Chrome extension that intercepts some data that a Javascript-based application is requesting. The URLs it requests its data from constantly change, so I can't just guess what they'll be. If I watch the Developer Console in Chrome, I can see all the requests I want. Is there a way to get an extension to automate this? 回答1: Checkout this example extension from Google: http://code.google.com/chrome/extensions/trunk/samples.html#cc8563a6666add797264184a960c7b7c8bd3e64d "Displays

Windows Chrome extension native messaging can only receive the first response

醉酒当歌 提交于 2019-12-22 00:51:12
问题 I am trying to use native messaging to send some data to my native windows application. It works well with the runtime.sendNativeMessage() method. When I am trying to use long lived connections which uses a port, it also can pass data from chrome to my app. However, chrome extension can only receive the first response from my app. I am sure that the port is still open because my app can still receive data from chrome. Following are my code: Chrome Extension Script: var port = chrome.runtime

Enterprise deployment of Chrome extension on locked down Windows computers with no internet access to chrome web store

拥有回忆 提交于 2019-12-22 00:34:23
问题 For enterprise-installed Chrome extensions on Windows, is there any alternative deployment methodology which does NOT fetch the extension from the Chrome web store? Situation is that some enterprises use a locked-down network with no external internet access, and will not allow access to public Google URL from which to fetch the extension. Does anyone have any experience with Chrome browser plus extension deployments on Microsoft App-V? 回答1: Absolutely, it's possible. Though it requires a

Chrome desktop notification for dynamic site update when chrome runs in background

扶醉桌前 提交于 2019-12-22 00:30:03
问题 I've created a bookmark extension for community website, which host posts, I need to have desktop notification of new posts in community site. chrome runs on background, but no tabs will be opened, unless notified by desktop notification. Idea is to send a message from background page to content script for regular interval and get updates on the post and display a desktop notification, thereby user opens the update on seeing notification. Query: How to access the DOM of website (when chrome

Log in to a meteor app from a Google chrome extension

老子叫甜甜 提交于 2019-12-21 23:41:45
问题 I have a meteor app that uses restop2 package to allow posting data. The restop2 package provides a way to log in by sending user / password to a specific URL : curl --data "password=PASSWORD&user=USERNAME" http://localhost:3000/api/login/ It returns a JSON response containing a user ID and an access token : {"loginToken":"TOKEN","userId":"USERID","success":true} I can then post to the api by sending the user ID and the access token in the header : curl -X POST -H "X-Login-Token: TOKEN" -H "X

Stopping content script in chrome extension

佐手、 提交于 2019-12-21 23:19:35
问题 I have developed chrome extension , I have added , chrome.browserAction.onClicked.addListener which will start the script once clicked on , the script in turn will add a div at the bottom of the web page on the tab the browser action is clicked , All I have to do is , I need to add a close link which will stop the content script and close the div at the bottom , I have tried windows.close() , self.close() but nothing seems to work ,I would atleast want it to work in a way that 2nd time some

How to change script location on firefox addon?

拈花ヽ惹草 提交于 2019-12-21 23:05:15
问题 What is the simplest way to make the firefox addon, which repeats this chrome functionality: chrome.webRequest.onBeforeRequest.addListener( function(info) { if(info.url.indexOf("notifier") + 1){ return {redirectUrl: "https://domain.null/1.js"}; } }, { urls: [ "*://domain2.null/*" ], types: ["script"] }, ["blocking"]); I know about nsIContentPolicy in firefox, but I don't understand how to use it. All opinions, advice, and help will be appreciated Answer I've determined the problem with the

keep getting kicked out my google login when using chrome.identity api

怎甘沉沦 提交于 2019-12-21 22:57:29
问题 I'm creating a chrome extension, I want to connect it with google spreadsheet to modify and load sheets. When I using chrome.identity API to get auth, my session of google account in Chrome always been kick out. even when I using sample code from the google. here is some code of my extension(only paste the core code): manifest: "permissions": [ "*://*/*", "storage", "tabs", "contextMenus", "alarms", "identity"], "oauth2": { "client_id": "64262386828-sng3chvgvldosl1586trtngrcp7ocfv5.apps

Chrome extension: Content script matching URL pattern for Gmail message

自闭症网瘾萝莉.ら 提交于 2019-12-21 22:50:33
问题 For my Chrome extension, I need a matching pattern for any valid Gmail message URL. Example: https://mail.google.com/mail/u/0/?shva=1#inbox/140acd877b64109b What I tried in manifest.json is the following: "content_scripts": [ { "matches": ["*://*.mail.google.com/mail/u/0/?shva=1#inbox/*"], "css": ["default.css"] } ] However, my custom stylesheet is not applied when I access a Gmail message with the URL pattern above. Any ideas why it is not applied? If I only use "matches": ["*://*.mail

Why chrome.bookmarks.search not searching folder

别来无恙 提交于 2019-12-21 22:31:11
问题 I'm try search folder bookmarks with "chrome.bookmarks.search" but not found enything. chrome.bookmarks.search('My folder', function(children) { children.forEach(function(child) { console.log(child) $('#grid').append(child.title); }); Why this code search only bookmarks and not folder. 回答1: There is a know bug\feature request for searching with folder name, check details and some discussions Work Around. Retrieve entire Book Marks Tree using chrome.bookmarks.getTree and filter folders with