google-chrome-extension

Chrome Extension Content Script - Grabbing YouTube video titles using JavaScript

谁说我不能喝 提交于 2021-02-10 21:37:25
问题 I have a simple content script for my Chrome Extension that is supposed to grab the titles of YouTube videos. My problem is that it has only worked once. I tried accessing the child nodes of the HTMLCollection which should only be one but I get null of undefined. Doing something like: element[0].innerText; doesn't give me anything useful but from my understanding if I use getElementsByClassName and apply innerText on the first element with [0] it shoud work. It might be an issue with the html

Chrome Extension Content Script - Grabbing YouTube video titles using JavaScript

你说的曾经没有我的故事 提交于 2021-02-10 21:22:49
问题 I have a simple content script for my Chrome Extension that is supposed to grab the titles of YouTube videos. My problem is that it has only worked once. I tried accessing the child nodes of the HTMLCollection which should only be one but I get null of undefined. Doing something like: element[0].innerText; doesn't give me anything useful but from my understanding if I use getElementsByClassName and apply innerText on the first element with [0] it shoud work. It might be an issue with the html

Chrome Extension and Jenkins URL's

痴心易碎 提交于 2021-02-10 19:33:54
问题 I'm currently trying to develop a chrome extension which is supposed to display data from different Jenkins servers. The url to the jenkins server is being entered by the user. So basically what I need is being able to access any kind of jenkins url. My problem is that Chrome's Content Security Policy only allows you to access domains which you've registered in the manifest.json like so: "content_security_policy": "script-src 'self' http://localhost:8080/; object-src 'self'" . But since

Chrome Extension and Jenkins URL's

落爺英雄遲暮 提交于 2021-02-10 19:32:50
问题 I'm currently trying to develop a chrome extension which is supposed to display data from different Jenkins servers. The url to the jenkins server is being entered by the user. So basically what I need is being able to access any kind of jenkins url. My problem is that Chrome's Content Security Policy only allows you to access domains which you've registered in the manifest.json like so: "content_security_policy": "script-src 'self' http://localhost:8080/; object-src 'self'" . But since

Chrome extension: script injection to workers and other nonpages

夙愿已清 提交于 2021-02-10 17:30:13
问题 Contentscripts don't seem to work for Worker, SharedWorker, ServiceWorker, and other nonpages. Is there a simple way to inject a script into the start of them? Sample contentscript runat docstart: var script = document.createElement("script") script.textContent = ` console.log = function() { return 0 } alert(console.log) // overridden, good var blob = new Blob([ 'console.log(Math.random())' // not overriden, bad ], { type: "text/javascript" }) var worker = new Worker(window.URL

Redirect the Chrome extension popup.html page to a URL for Oauth

六眼飞鱼酱① 提交于 2021-02-10 15:40:44
问题 Is it possible to redirect the popup Html of a chrome extension to a remote URL? I'm looking into this scenario for the purpose of OAuth. When a user clicks on the "Login with FB" button, I want the Html page of the chrome extension to redirect to: https://www.facebook.com/dialog/oauth?client_id={app-id}&redirect_uri={redirect-uri} so that the user is prompted to log in. Is this the right approach to do authentication in a Chrome extension anyway? 回答1: Popups are very.. fragile. They are too

How to sync firebase users across several locations? (extension + website)

会有一股神秘感。 提交于 2021-02-10 15:19:40
问题 I'm working on chrome extension (provides main functionality) and the complementary website (mostly profile and billing related functionality) both backed with firebase backend. I'm wondering if it's possible to implement the below scenario: user logs in with the extension using firebase authentication (with firebaseUI lib) I store a token that I can use to reauthenticate that user (is there such a token?) when user opens the website, I login that user automatically with the token. While both

webpack configuration: remove hash from *.js entry/bundle files names

一曲冷凌霜 提交于 2021-02-10 14:51:43
问题 I am doing a vue.js app. After build it generate a js file "background.2a548437.js" instead of the "background.js" that I want. I'm doing the webpack-chain configuration through the "vue.config.js" file. To diagnose, I'm reading the result of "$vue inspect", but I don't see which parameter should I tune to remove the hash from the js files. I do see patterns like 'img/[name].[hash:8].[ext]' but for js it's 'js/[name].js' Do you have any solutions or leads ? Context/Why: It uses webpack "^4.0

How do I get access to all the files in the extension in Chrome Extension Manifest Version 3 (MV3)?

♀尐吖头ヾ 提交于 2021-02-10 14:32:35
问题 Background I've been using the crx-hotreload package to auto-reload my chrome extensions during development because it's annoying to have to click the refresh button on the Extensions page every time you make a change; however, this package doesn't work with MV3 because it uses the chrome.runtime.getPackageDirectoryEntry method, which seems to have been removed from chrome.runtime in MV3. I can't find documentation to confirm that it was removed, but it's not there when I try to use it.

How do I get access to all the files in the extension in Chrome Extension Manifest Version 3 (MV3)?

痞子三分冷 提交于 2021-02-10 14:32:12
问题 Background I've been using the crx-hotreload package to auto-reload my chrome extensions during development because it's annoying to have to click the refresh button on the Extensions page every time you make a change; however, this package doesn't work with MV3 because it uses the chrome.runtime.getPackageDirectoryEntry method, which seems to have been removed from chrome.runtime in MV3. I can't find documentation to confirm that it was removed, but it's not there when I try to use it.