google-chrome-extension

Chrome extension, replace HTML in response code before browser displays it

混江龙づ霸主 提交于 2019-12-20 09:59:11
问题 i wonder if there is some way to do something like that: If im on a specific site i want that some of javascript files to be loaded directly from my computer (f.e. file:///c:/test.js), not from the server. For that i was thinking if there is a possibility to make an extension which could change HTML code in a response which browser gets right before displaying it. So whole process should look like that: request is made browser gets response from server #response is changed# - this is the part

chrome.identity.getAuthToken not working

坚强是说给别人听的谎言 提交于 2019-12-20 09:56:25
问题 I am working with Chrome Identity API, to provide users with a Google Authentication on my Chrome Extension. I followed the official tutorial of Google : link Chrome Identity API i added permissions to manifest.json and Client ID and Scopes to trigger the Authentification i added this code in my Background.js chrome.identity.getAuthToken The problem is when i execute the extension i am redirected to this login page chrome://chrome-signin/?source=5 but after a successfull authentication i am

Content Security Policy for extensions and bookmarklets

不问归期 提交于 2019-12-20 09:54:26
问题 Github has the following Content Security Policy: Content-Security-Policy:default-src *; script-src assets-cdn.github.com www.google-analytics.com collector-cdn.github.com; object-src assets-cdn.github.com; style-src 'self' 'unsafe-inline' 'unsafe-eval' assets-cdn.github.com; img-src 'self' data: assets-cdn.github.com identicons.github.com www.google-analytics.com collector.githubapp.com *.githubusercontent.com *.gravatar.com *.wp.com; media-src 'none'; frame-src 'self' render

Chrome Extensions - onRequest/sendRequest vs onMessage/sendMessage [duplicate]

自古美人都是妖i 提交于 2019-12-20 09:46:18
问题 This question already has answers here : Chrome Extension: Port error: Could not establish connection. Receiving end does not exist. (2 answers) Closed 6 years ago . Checking out this sample extension linked by a page in the Chrome Extension center, I see they used chrome.extension.onRequest.addListener(onRequest); in the background.js page in order to listen to the contentscript.js and chrome.extension.sendRequest({}, function(response) {}); in the contentscript.js in order to talk to the

Enable a non-PlayStore UserScript with Chrome 35 and above

穿精又带淫゛_ 提交于 2019-12-20 09:19:27
问题 Since the version 35 of Google Chrome, the execution of any extension installed outside of the Google's PlayStore is blocked and cannot be enabled from the extensions menu. The auto-installation of non-store scripts was removed two years ago but downloading the script and performing a drag & drop on the extensions menu still allowed the installation, so it was still possible to create and share scripts for Google's Chrome. But now everything is locked. Is it possible to manually add

Install Chrome extension not in the store

不打扰是莪最后的温柔 提交于 2019-12-20 09:10:29
问题 I have developed a Chrome extension and I have packed it. I sent my extension to some people to try it, but Chrome started to block extensions that it does not find in the store. Is there any way to install my extension without getting blocked by Chrome? EDIT Is there any way to install extension as developer mode? I read that only extensions that installed in developer mode will not blocked. 回答1: For regular Windows users who are not skilled with computers, it is practically not possible to

How to sync chrome extension options

蓝咒 提交于 2019-12-20 08:41:12
问题 I've made a Chrome extension with an options page. The data is saved in localstorage and works just fine. Chrome doesn't sync the localstorage to the cloud, just the extensions. This means that any user data will not sync to other computers of the same google account. I can not find an API at http://developer.chrome.com/extensions/docs.html which allows me to sync the user-chosen preferences. What methods do you suggest? 回答1: In the (hopefully near) future, you'll be You are now able to store

Executing Chrome extension onclick instead of page load

爱⌒轻易说出口 提交于 2019-12-20 08:40:03
问题 I created a Chrome extension that works as expected except that it only executes when I load a page that matches the conditions in the manifest. I have tried for hours to make it execute by clicking on the extension icon to no avail. The closest I have been able to what I want is that I have been able to make the extension icon click to run the code, but then it does not run it on the loaded page. It runs it on the extension's space instead of the page DOM. In the current state my code only

Convert operator from string type to operator type

不打扰是莪最后的温柔 提交于 2019-12-20 07:48:03
问题 I want to generate something like this at random. 233 + 333 = 566 I mean the first number and the operator and the second number are generated at random. So, I wrote this code now. var x = parseInt(Math.random()*1000), y = parseInt(Math.random()*1000), operators = ['+', '-', '*', '/'], operatorNum = parseInt(Math.random()*4), operator = operators[operatorNum], result; result = x + operator + y; But this just gives me something like "748/264" as a string. It doesn't give me the result of the

How to automatically set gmail filter via chrome extension?

假装没事ソ 提交于 2019-12-20 07:19:08
问题 I would like to implement the following use case as a Chrome extension: user visits gmail exension checks current email body for a keyword if a keyword is present, a gmail filter is added and saved (adding label, archiving, the details are not important here) The first part sounds easier: there is gmail API to work with and even a gmail.js project that should make it easier. Adding filter seems to be much harder. There is email settings API doing precisely what I want but I am fairly sure it