google-chrome-extension

“OAuth2 not granted or revoked” when trying to evaluate free trial in Chrome extension

|▌冷眼眸甩不掉的悲伤 提交于 2021-02-04 13:27:24
问题 I'm attempting to offer a free trial period for my Chrome extension and have been following the Chrome documentation about how this can be accomplished. When my extension loads, though, the background script is logging the following error to the console: Unchecked runtime.lastError while running identity.getAuthToken: OAuth2 not granted or revoked. The console is pointing at the call to chrome.identity.getAuthToken as the culprit. Here's the relevant code in my background script: var CWS

“OAuth2 not granted or revoked” when trying to evaluate free trial in Chrome extension

亡梦爱人 提交于 2021-02-04 13:27:06
问题 I'm attempting to offer a free trial period for my Chrome extension and have been following the Chrome documentation about how this can be accomplished. When my extension loads, though, the background script is logging the following error to the console: Unchecked runtime.lastError while running identity.getAuthToken: OAuth2 not granted or revoked. The console is pointing at the call to chrome.identity.getAuthToken as the culprit. Here's the relevant code in my background script: var CWS

chrome extension: creating new tab and taking focus to page

五迷三道 提交于 2021-02-04 11:46:46
问题 trying to make an extension that creating new tab and navigating it to some site and giving some <input> to focus. I check this question but cant solve my problem: How to steal focus from the omnibox in a Chrome extension on the new tab page? here is a sample code that I am trying to open a new tab navigating to google and trying to focus on the google search bar. this is my content_script.js try to catch a click on specified web page and specified <div> and send a message to my background.js

chrome extension: creating new tab and taking focus to page

那年仲夏 提交于 2021-02-04 11:46:05
问题 trying to make an extension that creating new tab and navigating it to some site and giving some <input> to focus. I check this question but cant solve my problem: How to steal focus from the omnibox in a Chrome extension on the new tab page? here is a sample code that I am trying to open a new tab navigating to google and trying to focus on the google search bar. this is my content_script.js try to catch a click on specified web page and specified <div> and send a message to my background.js

Can I access JavaScript snippets using chrome.devtools API?

心不动则不痛 提交于 2021-02-04 10:30:26
问题 I want to make a Chrome Developer Tools Extensions that needs access to newly added snippets in sources pane. Does chrome.devtools API have any way to access snippets? 回答1: Yes, you can do it through chrome.devtools.inspectedWindow API() You can track a) Content of all Snippets available b) When ever a new Snippet is added and its content c) When ever a Snippet is Updated with new content\modified. How ever for enabling the debugging etc you have to enable experimental developer flags. You

How to aim a bug in Chromium browser extension that there won't be if installed locally in Dev mode

你离开我真会死。 提交于 2021-02-02 10:01:44
问题 I've just tested my Chrome addon https://chrome.google.com/webstore/detail/soft-screen/oecaicengbgemdbdklmajocogdjjgnda after installing it officially, i.e. via CWS (Chrome Web Store), but was suddenly surprised that it's not working. I've always used it by installing it locally in Dev mode, i.e. by copying the addon installed and located at {The Chrome directory}\User Data\Default\Extensions\oecaicengbgemdbdklmajocogdjjgnda to another directory and then reinstall it by dragging it to the

Create hidden window in background js CHROME EXTENSION

有些话、适合烂在心里 提交于 2021-01-29 21:35:37
问题 I am trying to get all facebook requests in my popup html. i need to open a window with link on facebook web page where is all friend requests and click "accept" buttons. all this must happen when user click in my popup buttton "activate". i try something like this but problem is that always show a new windwow but i need hidden window. background-js: chrome.windows.create({url: "https://mobile.facebook.com/friends/center/requests/?rfj", type:"normal", focused:false } 来源: https://stackoverflow

Building Chrome Extensions on Existing Production React Websites

穿精又带淫゛_ 提交于 2021-01-29 18:24:54
问题 Background: I've been developing a bunch of browsers extensions on production sites (Yelp, Zillow, Trulia, Reddit) which use react. I've yet to take a course on React (I'm planning on doing it) but my questions are: How stably named are the classes in production react sites (many of the classes have weird numbers and letters appended) and if they are not stable, how often do they change and is there any way to get a more stable selector for these types of items? When classes are completely

Edit descrption or location of google calendar event with Chrome Extension

白昼怎懂夜的黑 提交于 2021-01-29 18:02:19
问题 I have a chrome extension and I want to be able to edit the description or location field of a google calendar event when a user clicks a button. I have the button set up and can access the nodes of the popup window for a calendar extension. The add description or attachments field is not a text box until clicked. If you click this span in the UI <span class="DD3VVc" data-key="description" jsaction="clickonly:OVoCkb; mousedown:nzqhhd">description</span> it will become a text box. However, if

<all_urls> get changed into \u003Call_urls> when uploading to the Chrome store

﹥>﹥吖頭↗ 提交于 2021-01-29 16:23:56
问题 I have an extension that works well on my local, the manifest has those configuration: "background": { "scripts": [ "js/tabCapture.js", "js/main.js" ], "persistent": false }, "permissions": [ "desktopCapture", "tabs", "activeTab", "<all_urls>", "identity" ], However, when uploading to Chrome store (successfully), I tried installing it but it didn't work any more. I checked the Extension tab and see no background page for my extension. Upon further investigation, I tried loading the extension