google-chrome

How to disable (gray out) page action for Chrome extension?

心已入冬 提交于 2020-11-30 00:17:35
问题 I want the Chrome extension icon to be disabled (grayed out) on all pages except for pages on docs.google.com. This is my code in background.js. 'use strict'; chrome.runtime.onInstalled.addListener(function() { chrome.declarativeContent.onPageChanged.removeRules(undefined, function() { chrome.declarativeContent.onPageChanged.addRules([{ conditions: [new chrome.declarativeContent.PageStateMatcher({ pageUrl: { urlContains: 'docs.google' }, }) ], actions: [new chrome.declarativeContent

Selenium - Basic Authentication via url

白昼怎懂夜的黑 提交于 2020-11-29 18:10:18
问题 In my Selenium-Test (with chromedriver-2.24 ) I'm trying to access my webpage via basic authentication with the following statement: WebDriver driver = ...; driver.get("http://admin:admin@localhost:8080/project/"); But Google Chrome gives me the following warning in the console: [Deprecation] Subresource requests whose URLs contain embedded credentials (e.g. https://user:pass@host/ ) are blocked. See https://www.chromestatus.com/feature/5669008342777856 for more details. In the tagged link is

Selenium - Basic Authentication via url

99封情书 提交于 2020-11-29 17:53:22
问题 In my Selenium-Test (with chromedriver-2.24 ) I'm trying to access my webpage via basic authentication with the following statement: WebDriver driver = ...; driver.get("http://admin:admin@localhost:8080/project/"); But Google Chrome gives me the following warning in the console: [Deprecation] Subresource requests whose URLs contain embedded credentials (e.g. https://user:pass@host/ ) are blocked. See https://www.chromestatus.com/feature/5669008342777856 for more details. In the tagged link is

Selenium - Basic Authentication via url

こ雲淡風輕ζ 提交于 2020-11-29 17:51:05
问题 In my Selenium-Test (with chromedriver-2.24 ) I'm trying to access my webpage via basic authentication with the following statement: WebDriver driver = ...; driver.get("http://admin:admin@localhost:8080/project/"); But Google Chrome gives me the following warning in the console: [Deprecation] Subresource requests whose URLs contain embedded credentials (e.g. https://user:pass@host/ ) are blocked. See https://www.chromestatus.com/feature/5669008342777856 for more details. In the tagged link is

Why video.requestPictureInPicture() works only once?

て烟熏妆下的殇ゞ 提交于 2020-11-29 10:40:25
问题 I'm trying enter and exit PIP mode of video via Javascript onscroll function and I can only once enter and exit this mode. Here's my codepen: `if (!myVideo.paused && myVideo.currentTime > 0 && !myVideo.ended && !isVideoPIP) { console.log('runPip') myVideo.requestPictureInPicture() .then(()=>{isVideoPIP = true;}) .catch(e=>console.log(e.message)); }` https://codepen.io/Greggg/pen/WBdeJG Second time I have this error message "Must be handling a user gesture if there isn't already an element in

Why video.requestPictureInPicture() works only once?

家住魔仙堡 提交于 2020-11-29 10:36:50
问题 I'm trying enter and exit PIP mode of video via Javascript onscroll function and I can only once enter and exit this mode. Here's my codepen: `if (!myVideo.paused && myVideo.currentTime > 0 && !myVideo.ended && !isVideoPIP) { console.log('runPip') myVideo.requestPictureInPicture() .then(()=>{isVideoPIP = true;}) .catch(e=>console.log(e.message)); }` https://codepen.io/Greggg/pen/WBdeJG Second time I have this error message "Must be handling a user gesture if there isn't already an element in

Shadow Dom inheriting parent page CSS [Chrome] [duplicate]

半城伤御伤魂 提交于 2020-11-29 04:29:45
问题 This question already has an answer here : Light DOM style leaking into Shadow DOM (1 answer) Closed 6 months ago . Everything I've read indicates that the Shadow Dom is supposed to be 'safe' from its parent page CSS. I.E. if I have all divs styled to have purple font: <style> div{color: purple} </style> The divs in my Shadow Dom should have the browser default color. I am writing a chrome extension that injects html into any given page. Unless this html is protected by either Shadow Dom or

Is there any way to record a video of website using headless Chrome?

时光总嘲笑我的痴心妄想 提交于 2020-11-26 16:49:25
问题 I know there is a way to make screenshots, using many available APIs, such as Puppeteer https://github.com/GoogleChrome/puppeteer but what about recording videos? my goal is to capture a CSS animation into an mp4 file. Or am i doing it all wrong, are there better tools for that on the server side? 回答1: https://www.npmjs.com/package/puppeteer-recorder Something like this can work, it takes lots of screenshots and stitches them together 来源: https://stackoverflow.com/questions/48261175/is-there

audio/mp4; codecs=“mp4a.40.2” not playing in Chrome and Firefox

喜你入骨 提交于 2020-11-25 04:08:30
问题 It seems I want to convert audios, which I want to stream on my website, to audio/mp4; codecs="mp4a.40.2" . Using ffmpeg-cli-wrapper, I am converting my uploaded audio files with this command here: ffmpeg -i /tmp/input.any -acodec aac -b:a 256000 /tmp/output.aac On the client I am creating a SourceBuffer like this: this.sourceBuffer = this.mediaSource.addSourceBuffer('audio/mp4; codecs="mp4a.40.2"'); The errors are: Chrome: NotSupportedError: Failed to load because no supported source was

audio/mp4; codecs=“mp4a.40.2” not playing in Chrome and Firefox

放肆的年华 提交于 2020-11-25 04:08:26
问题 It seems I want to convert audios, which I want to stream on my website, to audio/mp4; codecs="mp4a.40.2" . Using ffmpeg-cli-wrapper, I am converting my uploaded audio files with this command here: ffmpeg -i /tmp/input.any -acodec aac -b:a 256000 /tmp/output.aac On the client I am creating a SourceBuffer like this: this.sourceBuffer = this.mediaSource.addSourceBuffer('audio/mp4; codecs="mp4a.40.2"'); The errors are: Chrome: NotSupportedError: Failed to load because no supported source was