Questions tagged [google-chrome-extension]

1

votes
2

answer
38

Views

chrome.storage.sync.get always returns default value

I am developing a chrome extension and it requires me to keep track of the last date that the extension was run. To do so, I am using chrome.storage.sync, however, the get call always returns the value that I have set as the default. Below is the code. chrome.storage.sync.get({theDate: {}}, function...
Arj
1

votes
2

answer
53

Views

How do I add and use Chrome Extensions with Cypress.io?

I'm currently dealing with a an X-Frame-Options issue being blocked when running my Cypress.io tests. I cannot change the server setup to modify the X-Frame settings. Somebody mentioned to me that I should try a chrome extension called 'Ignore X-Frame headers.' I have the extension installed on...
tonyrocks
1

votes
1

answer
25

Views

Chrome Web Store traffic - how can I see a detailed split by traffic source?

Is there a way to see from where traffic is coming to my Chrome Web Store extension? I'd like to understand how many find the extension through: - my own website - searching on Chrome store - searching on Google - find it in a blog etc. This way I could draw similar conclusions that I can do in Goog...
pyrytakala
0

votes
0

answer
4

Views

Create-React-App Chrome Extension - Have a second HTML and JS file?

I have a Chrome extension created via create-react-app that injects content a webpage. The extension's popup window is created with React using the index.html file in the public folder and the index.js file in the src folder by default. I currently have another HTML file in the public folder that ge...
chivs688
0

votes
0

answer
6

Views

How to access Browser Extensions (browser namespace) Javascript API in React

I've recently taken some interest in creating a browser extension for Firefox. Because I've got a lot of experience with React & I want to combine that with the browser extension, I'm trying to understand how to implement the browser namespace in React. Let's say I would want to get and render a li...
Cédric Bloem
1

votes
1

answer
1.3k

Views

How to redirect URLs using chrome.webRequest API?

background.js: chrome.webRequest.onBeforeRequest.addListener(function (details) { console.log(details.url); window.location.href = 'http://time.com/'; }, {urls: ['']}, []); It shows all requests in the console when I visit a web site, but it doesn't redirect the site to time.com. Additional Informat...
Kaeus
1

votes
1

answer
97

Views

How to close gmail compose dialog programmatically in chrome extension

I have replaced the 'Send' button in the compose dialog with my 'Send' button and using 'Gmail API' to send the email. I am able to send the email and get the response. Now to make it more user-friendly, I want to close the compose dialog after my email is sent (similarly when the Gmail closes the d...
Pallavi Goyal
1

votes
1

answer
55

Views

Showing popup on page_action

What am I missing that popup is not being shown? In popup folderI have four files. I load that file as extension. I can see the icon, but when I click on it popup i snot shown. Why? content_script.js: empty (just added so that I can load the extension) icon.png: It is shown, when I load extension. m...
user1953366
2

votes
0

answer
93

Views

Backend error 500 when accessing Chrome Web Store licensing API

I'm trying to make a chrome extension, which will have a free trial. Following the documentation here, the first thing to do is enabling Chrome Identity API. As far as i can tell, there's no such thing... Anyway... I've done every other steps, and ends up with a 500 error. Here is part of what i've...
JSlain
1

votes
0

answer
136

Views

localStorage access from firefox extension scope

I have a Selenium program running Chrome/Firefox web drivers with my extension on each browser. The extension is generic and each time the program runs it loads different config to the extension using localStorage. The flow is: Start the web driver with the extension installed. Navigate to a web pag...
Adi Ohana
1

votes
1

answer
58

Views

Extract data from WebPage via chrome Extention

I am looking to make a chrome extension which is continuously scans the webpage I'm currently on, and looks for certain keywords that I type, and if those keywords are typed then do some action accordingly. How is this possible in JavaScript? a rather simpler yet useful information would help a lot...
Rafay Shams
1

votes
0

answer
458

Views

Use env variable in background script of Chrome extension

Is there a way to use an env variable in a background script of a Chrome extension? I need to conditionally take an action depending on whether we are in development/production environment.
MrCholo
1

votes
1

answer
597

Views

get chrome app console logs in chrome os debug log

I've got a chrome app with several isolated layers (webviews, iframes), all those layers are logging some debugging stuff to console with console.log(). I managed to get all console logs inside a chrome debug log when launching chrome on mac os with --enable-logging --v=1 flags. The problem is I can...
Victor L.
1

votes
2

answer
410

Views

window.open _self not working in background.js - chrome extension

Good morning Masters ^^ Firstly, i just have a small problem what i cant solve o.o I have a google chrome extension program which made those : - If mouse event happening then open one other page (itself detectionclicks.js) - If until 5 minutes not happening mouse event open back the before page (its...
Jedi the padavann
1

votes
1

answer
201

Views

How to overlay jQuery UI dialog over entire page?

I'm trying to make a jQuery modal dialog box that covers the entire webpage. It works fine on some sites but not on others. The problems I'm having are that the dialog box is underneath webpage content, like the google search bar and button, and the modal overlay does not cover the entire page. Here...
Carsen
1

votes
0

answer
105

Views

Why chrome.tabs.executeScript matchAboutBlank is not valid for top-level about:frames?

I am developing a Chrome plugin which creates a new window based on the content of the current page, and then another plugin which needs to insert some code to the about:blank page created previously (using background.js, and not content_scripts, as in this case: Chrome extension permission for 'abo...
David Portabella
1

votes
2

answer
39

Views

Can't access to the page content

I have a problem while trying to get an element by name 'login'. It should return 1 if there is at least one HTML input with this name. But it doesn't work! Chrome console doesn't write any errors. smart.js chrome.webNavigation.onCompleted.addListener(function(){ console.log('And finally ' + documen...
Jerey
1

votes
1

answer
628

Views

Publish Unlisted Chrome Extension via Chrome webstore Api

I have completely read the following documentation: Publish API Doc Looks like there is only 2 options, Publishing an item to the public and Publishing an item to trusted users. No mention of unlisted extension publish. Can we some how publish an unlisted chrome extension via the webstore api?
Anoosh
1

votes
0

answer
505

Views

chrome.tabs.onUpdated.addListener(namedFunction) - function scope

I am developing a browser extension using Chrome API. For this specific task, I need to add a listener for the chrome.tabs.onUpdated event, using a named function, since I need to remove it on completion. The issue appears when I set this listener inside other event listeners - more concretely, for...
user1298923
1

votes
0

answer
91

Views

How to connect server to google chrome extension

I know that it is possible to connect chrome extension with a server, but is it possible to connect the server with chrome extension? I need to push some data to chrome extension from server and than push it back to server. Is it possible? And if yes, how? Thanks a lot
1

votes
0

answer
560

Views

Open link with http authentication in new tab

I am currently coding a small chrome extension, which is supposed to trigger an action once a link with href attribute is clicked. This action does the following thing: First it gets the data of the href. Then it checks if the href is leading to a specific domain. After that, split the URL and inse...
NullDev
1

votes
1

answer
56

Views

Youtube Playback Chrome Extension

I cannot understand why this isn't working. I have checked the google extension dev docs, checked some sample code. Checked other stackoverflow Question/Answers without any positive feedback/results from testing. This extension is very simple It displays a popup with an input text field and a butto...
Dean Van Greunen
1

votes
1

answer
79

Views

Chrome extension manifest matches How to only match base URL, no subpages

I am making a Chrome extension for Twitter and only want it to affect pages on twitter.com but not affect subpages(i.e. twitter.com/mentions). My manifest is currently set as the following, but still affects subpages. 'matches': ['http://www.twitter.com/','https://twitter.com/'], Any ideas?
xthree
1

votes
0

answer
37

Views

Load a url from an event into a qtip using ajax

I have a chrome extension which must display the preview of the link in a tool-tip. Right now I can display the url using the text but when it is passed into the ajax part I have no idea how to pass the url as either the event or as an element.Right now it displays the same page on which the browser...
Ben Stewart
1

votes
1

answer
25

Views

proper way to use chrome local storage

i'm trying to use chrome.storage.local. but i'm having problems with the 'set' method. i'm sending 2 variables to the function named 'setValue', one is network and the second is value. the porpose of the function is to use the network as key and the value as value. when i'm trying to do this: saveV...
lol
1

votes
0

answer
42

Views

Refresh Angular 4 binding changes from chrome extension threads

I am using angular 4 to build an extension that manages chrome bookmarks and in bookmarkslist.component.ts constructor I called chrome.bookmarks.getTree(t=>this.tree = t) but the callback does not make angular 4 to refresh changes for test purpos I added a button that add an Item to 'tree' array .....
Ala'a .H
1

votes
0

answer
89

Views

Cannot add Cookie header via webRequest for HTML import requests

I'm developing a feature in an extension that allows users to override some local resources with remote ones. To do so, we are using webRequest to redirect selected requests to the remote location. This works fine, Cookies can be sent correctly on those ones and remote resources can then be loaded (...
Romain Sertelon
1

votes
0

answer
65

Views

Angular 2 binding not working when run as chrome extension

I'm building a chrome extension using Angular. I have a simple login form: Invalid Credentials Username Password Login and it works fine when i run the app in the browser - the login method on the controller is invoked with the correct values. However, when I run the app in a chrome extension (load...
Jonesopolis
1

votes
0

answer
729

Views

OneTab extension for chrome local storage files disappeared

I'm an old user of the chrome extension OneTab. I used to move its local database files 'chrome-extension_chphlpgkkbolifaimnlloiipkdnihall_0.localstorage' on the 'C:\Users\XXXX\AppData\Local\Google\Chrome\User Data\Default\Local Storage' folder when i change my PC or reinstall windows. I currently...
user864032
1

votes
2

answer
429

Views

Porting Chrome extension to Edge

I have created a chrome extension to enable clipboard data access. The solution is explained in details here Implementing 'Paste' in custom context menu. Now the problem is how to port this extension to Edge. There is a tool for that I know I used it, and maybe it is working, but my problem is how t...
Mediha
1

votes
0

answer
759

Views

chrome.runtime.sendMessage is showing error “Message length exceeded maximum allowed length”

When i am sending big size of json object from content.js to background.js usingchrome.runtime.sendMessage then showing error like : refer error image to see actual error message Error is : Uncaught Error: Message length exceeded maximum allowed length. if anybody know about how to increase sendmess...
Mehul Prajapati
1

votes
0

answer
188

Views

Publishing UWP App with Edge and Chrome extension

for a my UWP App I have created an extension for Edge and Chrome. I have tried to create a new submission to the store but I have received the following errors: com.microsoft.edge.extension is a reserved extension type. Your app does not have permission to use this extension type. To request permiss...
MatVic
1

votes
1

answer
222

Views

How to use chrome.runtime.onMessage.addListener parameter as global variable?

Im trying to get chrome.runtime.onMessage.addListener parameter out of function. But it works just inside method. chrome.runtime.onMessage.addListener(function(response, sender, sendResponse){ alert(response); // its ok! }); But when Im trying to declare it as external variable, it do not work. chro...
1

votes
1

answer
41

Views

Can my team use a Chrome extension we developed without buying it? How? Where do I define the list of people that can use it?

We developed and published an extension that requires one time payment. How can I define a list of people from my organization that will be able to use it without paying?
Gil Roth
1

votes
0

answer
5.2k

Views

Chrome Extension and Identity API: Upon login attempt to Facebook user is asked for username + password although he is already logged on FB

I'm developing a Chrome Extension and use Chrome Identity API's to perform Facebook Oauth 2.0 authentication. Personally, I'm testing this on the latest Chrome version (64). In principal, the login flow works fine. However, I am annoyed that Chrome presents a new user a Facebook login window with em...
Steve06
1

votes
0

answer
124

Views

chrome.identity.onSignInChanged callback does not fire

I have this hook registered: chrome.identity.onSignInChanged.addListener(function (identity) { console.log('identity changed:', identity); }); the problem is that this callback never fires. I allow the user to sign in with different Google accounts using these calls: here is the login: runUserLogin(...
Alexander Mills
1

votes
0

answer
230

Views

How can I send messages to a Chrome extension from localhost?

Chrome apps are gone, so no chrome.sockets.tcpServer. chrome.gcm is gone, and Firebase is way too heavy for my interests (not that I ever used chrome.gcm). I just want to send messages from localhost; I don't want to register anything or maintain an app server. I tried the Push API with Service Work...
John Freeman
1

votes
1

answer
30

Views

How to execute content script in view-scource scheme?

I want to excecute content script in view-scource scheme. As in the content script match patter they didn't specified it. Anyone know how to do that?
janaravi
1

votes
1

answer
487

Views

How to force the Google API/OAUTH consent screen?

I have a Chrome Extension that, in the manifest, includes the Drive API. On install, when the user opens a Google Doc, background.js pops the consent screen to get the user's permission to access their Google Drive. This works fine on install. But if the user removes the app from Drive the code does...
11teenth
1

votes
0

answer
26

Views

activate background event using shortcut key

I am trying to create a chrome extension where if user selects the item in any web page and hit Ctrl+n then that highlighted text spelling should be altered. How do i do it? I have tried using background event page functionality where DOMContentLoaded is used so I can use the listener where there is...
pri

View additional questions