google-chrome-extension

Blocking cookie setting/retrieving by modifying headers

可紊 提交于 2019-12-24 15:33:32
问题 I'm trying to make a Google Chrome extension that analyzes cookies before they're set/retrieved by websites and, if they don't meet certain requirements, stops the operation. To start, I'm trying to just block cookie setting entirely. After trying (and failing) to override their getter and setter, I was recommended to try and modify headers and their Set-Cookie elements instead. If anyone is interested in the previous question, it's here. The extension I came up with only has the following

Module Load Progress Events in NaCl with manifest_version = 2 and no inline javascript

做~自己de王妃 提交于 2019-12-24 15:23:57
问题 I upgraded my manifest_version to "2" as per this document, and then was suprised to see chrome burping up errors like: Refused to execute inline script because it violates the following Content Security Policy directive While it is clear why they would do this, I am now unclear how i should be managing Module load progress events. Even if i ratchet it to the latest (dev) pepper release, the documentation is still recommending an inline script (which obviously doesn't work). I am a bit

Enable Google API for “googleapis.com/auth/userinfo”

扶醉桌前 提交于 2019-12-24 15:23:20
问题 I am developing a Google Chrome Extension. I would like to be able to access the user profile info, using the data from these endpoints: https://www.googleapis.com/auth/userinfo https://www.googleapis.com/oauth2/v1/userinfo I don't seem to have access to these resources. From my web searches, it looks like I may need to enable a library API in the Google Developers Console. But I looked there and cannot find an appropriate API to enable. Does anyone know which API I should enable? 回答1: If you

Chrome console click() not working on Chat List in web.whatsapp

心不动则不痛 提交于 2019-12-24 15:23:18
问题 I'm try to built a chat bot for whatsapp web. I need to click on each chat present in the chat window in the left side panel. The click is not working on the chat list only. I did some research and came across below link. Chome console .click() working on one website, but not on another website. Why and how? I was able to trigger other click, like click on the title of chat when using below script. $('#main ._3V5x5').click() I have fetch the div of the first element in the chat list using

How to re-upload an extension with a deleted extension-ID?

夙愿已清 提交于 2019-12-24 14:56:50
问题 I have a chrome extension with an existing extension Id and a local update file (on our server) that is used by many users. I uploaded the extension to the extension store successfully. Seeing I needed to make some changes I deleted the extension from the store. I made the required changes and tried to upload the amended extension file again (with the same id). I got the error: ""An error occurred: Gallery system error, please try again later." I read in some forums that I should wait. I'ved

chrome.tabs.onupdated.addlistener doesn't work on cached pages

不羁岁月 提交于 2019-12-24 14:53:08
问题 chrome.tabs.onUpdated.addListener(function (tabId, changeInfo, tab) { if (tab.url.indexOf('http') == '0' && changeInfo.status == 'complete') { alert(JSON.stringify(changeInfo)); } }); i have such background.js it nearly works always %99 but not %100 whenever i restart my browser and enter an already accessed web page when browser loads all contents from cache it doesn't fire this chrome.tabs event but the interesting part is when i click same website from dial speed it doesn't load from cache

Chrome extension pauses before loading

血红的双手。 提交于 2019-12-24 14:13:08
问题 Question How do I reduce the time between clicking an extension icon and the content being displayed? Support I'm making a very simple extension. It loads quickly once it's started, but there is a bit of a delay between clicking and the popup loading. I've added a gif of this here. (The gif gets a bit hectic to look at, so I've put it under a link so that it doesn't burn your eyes!) It doesn't really do it justice as it loads faster on my machine than other people's for some reason. This

chrome extension, jstree, iframe: drag and drop

家住魔仙堡 提交于 2019-12-24 14:07:09
问题 I'm new to chrome extensions development and I'm building one that requires a side panel (not the popup), like firebug but on the right side. I'm using jsTree (with json_data) in the side panel and I want to drag elements from the webpage to the side panel. So far, to create the side panel, I've used a div appended to the body with a z-index so that it appears above the webpage, but the elements' styles in my side panel are altered because of the website's css. So I thought I could use an

Open chrome://extensions from web using link

前提是你 提交于 2019-12-24 13:33:45
问题 I have an chrome extension that might be disabled by the user. I want to create a link to the chrome://extensions menu in that case. It would be something like <a href="chrome://extensions" target="_blank">Chrome extensions</a> which is not allowed: Not allowed to load local resource: chrome://extensions/ Most of the solutions I have read imply the use of an extension (which for this use case will be disabled): chrome.tabs.create({'url': 'chrome://extensions'}); Is there any way to solve this

A issue when inject a javascript code that OVERRIDES the one existing in DOM?

本秂侑毒 提交于 2019-12-24 13:20:03
问题 I have read this question Is it possible to inject a javascript code that OVERRIDES the one existing in a DOM? and the solution works well most of time, but sometimes, seems JavaScript code in page will run first and then content_scripts. This will make the 'OVVERRIDES' failed sometimes. My test code as below: //manifest.json "content_scripts": [ { "matches": ["http://*/*"], "js": ["js_injector.js"], "run_at": "document_start" } //js_injector.js function injectJs(link) { var scr = document