google-chrome

Playing WAV file in Chrome fails

百般思念 提交于 2021-01-28 08:47:04
问题 I'm writing web application where users can listen audio (WAV) files using soundmanager2. Application is running on Amazon micro instance, but static files are served from my university server. Everything seemed to work fine, but I encountered problem with playing audio from Chrome browser but ONLY when files are served from university server. The same file served from Amazon server works fine in all browsers. If you want to test I paste links bellow. Amazon (APACHE) - works on all browsers:

get request and response body from Chrome API onCompleted method

非 Y 不嫁゛ 提交于 2021-01-28 08:40:04
问题 How to record request and response body, chrome API onCompleted method is giving to record response header. How to do without opening developer tool? I am developing a Chrome extension where I should capture total request and response. Currently, for the response, I'm able to capture response headers alone, is there a way to capture the entire response body? I have looked all the Chrome APIs and include onComplete method it is giving the option to capture response header only. Also, I want to

STOP Google Autofill/AutoComplete from ruining my form, Disable autofill on form

与世无争的帅哥 提交于 2021-01-28 08:00:59
问题 I have a form with an input field: <input id="postalCode" placeholder="Postal Code* (A0A 0A0)" autocomplete="off"> I was using my own custom autocomplete here which google autofill COVERS and ruins the validation and user experience in my form. I have tried changing the id to something random id="ASDf" and still google infers the field type by the validation or placeholder. I have tried the autocomplete="off" and "false". Neither do anything. On this page: https://www.canadapost.ca/cpotools

get img src on google images with puppeteer

佐手、 提交于 2021-01-28 07:03:18
问题 Im doing a small script, and i want it to get a src from the first image on google photos, i have tried so many things, but i havent been able to get the src and save it into a variable. This is the script so far, i will be very grateful if you help me. const puppeteer = require('puppeteer'); let imgSrc (async () => { const browser = await puppeteer.launch({ headless: false, }); const page = await browser.newPage(); await page.setViewport({ width:1920, height:1080, isMobile: false }) await

Python Selenium Set Multiple Chrome Preference

荒凉一梦 提交于 2021-01-28 06:25:25
问题 I am trying to set multiple chrome options in my chrome browser. This is what I currently have: prefs = {"download.default_directory" : "Download/Path"} moreprefs = {'safebrowsing.enabled': 'false'} chromeOptions = webdriver.ChromeOptions() chromeOptions.add_experimental_option("prefs", prefs) chromeOptions.add_experimental_option("prefs", moreprefs) self.driver = webdriver.Chrome(chrome_options=chromeOptions) The probblem is it only takes in to account the 1 of the chromeOptions.add

Access Chrome clipboard events with extension

被刻印的时光 ゝ 提交于 2021-01-28 06:12:03
问题 I want to copy the system clipboard data in my extension; I am able to get the events for copy, cut and paste of my extension, bt I want to get the event when ever system clipboard changes. How can I do this? 回答1: In general, you cannot. There is no event that indicates that SOMEWHERE in the system the clipboard was updated. An imperfect solution would be to inject content scripts in all pages and listen to events in them. This will only work for copy/cut of the content of the pages

Open new tab from chrome extension

烂漫一生 提交于 2021-01-28 05:17:57
问题 I wanna create a chrome extension that when you click it that you open my website. But how? I tried searching on google but this is all what I could create: { "name": "My First Extension", "version": "1.0", "description": "The first extension that I made.", "browser_action": { "default_icon": "icon.png" chrome.tabs.create({'url': chrome.extension.getURL('popup.html')}, function(tab) { // Tab opened. }); }, "permissions": [ "http://api.flickr.com/" ] } But this doesn't seem to work. 回答1: The

How to delete Proxy-Authorization Cache on Chrome extension?

限于喜欢 提交于 2021-01-28 04:51:43
问题 I am building a "proxy client" extension for chrome and i have following scenario: Users can login to the extension and get a token from API. Tokens are valid for 2 hours. After login users can select a proxy server from a list and that proxy is set with chrome.proxy api. I am using Squid on proxy servers. When a user connects to a proxy server and lands on onAuthRequired i return email and token as authCredentials. Chrome uses those credentials from cache until token is not valid anymore and

How to implement “return true;”? Error: “The message port closed before a response was received.”

倾然丶 夕夏残阳落幕 提交于 2021-01-28 04:50:52
问题 How can I implement that my event-handler returns true ? (Tried everything but the error returns) I'm getting following error: "Unchecked runtime.lastError: The message port closed before a response was received." Solution is: "Note: The sendResponse callback is only valid if used synchronously, or if the event handler returns true to indicate that it will respond asynchronously. The sendMessage function's callback will be invoked automatically if no handlers return true or if the

CSS Grid Firefox vs Chrome difference with grid-template-columns [duplicate]

萝らか妹 提交于 2021-01-28 04:29:38
问题 This question already has answers here : Flex / Grid layouts not working on button or fieldset elements (3 answers) Closed 7 months ago . The following snippet was designed for use in Firefox (79.0a1 from 2020-06-24), where the CSS grid is behaving as I expected (label and input on the same row, submit spanning the width of the fieldset). In Chrome (83.0.4103.116), the label and input go on different rows and the submit button is as narrow as its value allows. <!DOCTYPE html> <html lang="en">