google-chrome-extension

Non blocking alert for a chrome extension popup window

℡╲_俬逩灬. 提交于 2021-02-07 17:12:48
问题 I'm making a chrome extension and for it I need to add in some non blocking alerts to the pop up window. Regular alerts pause the javascript code execution and the client does not want that. I tried using jQuery's UI Dialog box but when I click the "OK" button to close it, the popup window loses focus and closes as well. Any advice on how to either add persistence to the popup window or on how to create a non blocking alert from the popup? UPDATE: The problem is that content.js is the one

Non blocking alert for a chrome extension popup window

家住魔仙堡 提交于 2021-02-07 17:11:04
问题 I'm making a chrome extension and for it I need to add in some non blocking alerts to the pop up window. Regular alerts pause the javascript code execution and the client does not want that. I tried using jQuery's UI Dialog box but when I click the "OK" button to close it, the popup window loses focus and closes as well. Any advice on how to either add persistence to the popup window or on how to create a non blocking alert from the popup? UPDATE: The problem is that content.js is the one

How can I call functions defined in a Chrome Extension from regular websites?

一笑奈何 提交于 2021-02-07 14:15:58
问题 I'd like to make a website that is not part of the chrome plugin but rather just uses some API that the plugin exposes to it. Is this possible and if so, how do I do it? I googled this question and was unable to find anything. I'm trying to use content scripts but nothing happens. Can someone explain what's wrong here? manifest.json { "manifest_version": 2, "name": "Hello World Extension", "description": "This extension prints hello world.", "version": "1.0", "background": { "page":

Resize popup.html in chrome extension

故事扮演 提交于 2021-02-07 13:23:38
问题 I have this chrome extension that shows some content in the popup.html. As the content changes at "run-time" the popup.html sizes change too, expanding where there's more content to show. The problem that I have is that the popup.html don't resize itself back according to a smaller content. How can I do that? 回答1: Add <!DOCTYPE html> to the very beginning of the popup.html - it looks like you've forgotten to add it 回答2: I had a pesky CSS line: body { min-height: 100vh; } in my popup's CSS and

Resize popup.html in chrome extension

若如初见. 提交于 2021-02-07 13:23:37
问题 I have this chrome extension that shows some content in the popup.html. As the content changes at "run-time" the popup.html sizes change too, expanding where there's more content to show. The problem that I have is that the popup.html don't resize itself back according to a smaller content. How can I do that? 回答1: Add <!DOCTYPE html> to the very beginning of the popup.html - it looks like you've forgotten to add it 回答2: I had a pesky CSS line: body { min-height: 100vh; } in my popup's CSS and

Accessing all the window variables of the current tab in chrome extension [duplicate]

↘锁芯ラ 提交于 2021-02-07 12:17:19
问题 This question already has answers here : Use a content script to access the page context variables and functions (6 answers) Closed 5 years ago . Can anyone post the code for accessing the window variables in chrome extension. I need to access the window variables when i click the chrome extension button. I am getting the window object, but not with all the variables loaded. I know we can create it by injecting the script. But i am not getting how to achieve it. Currently I am trying the

Accessing all the window variables of the current tab in chrome extension [duplicate]

那年仲夏 提交于 2021-02-07 12:16:39
问题 This question already has answers here : Use a content script to access the page context variables and functions (6 answers) Closed 5 years ago . Can anyone post the code for accessing the window variables in chrome extension. I need to access the window variables when i click the chrome extension button. I am getting the window object, but not with all the variables loaded. I know we can create it by injecting the script. But i am not getting how to achieve it. Currently I am trying the

Is it possible to get bitrate of mp3? [duplicate]

笑着哭i 提交于 2021-02-07 11:11:46
问题 This question already has an answer here : html5 audio. How to get bitrate (1 answer) Closed 6 years ago . My Chrome extension shows a list of links to .mp3 files and I need to get the bitrate for each element. How can I calculate this? UPDATE Solved it. 回答1: Solved it with this simple AJAX request: var audioLink = document.querySelector('.my_audio_link_class'); var durationBlock = document.querySelector('.element_with_duration_in_text_class').innerText.split(':'); //it has string '1:36' for

How to generate the appID for a Google Chrome Extension [duplicate]

坚强是说给别人听的谎言 提交于 2021-02-07 08:32:18
问题 This question already has answers here : Closed 8 years ago . Possible Duplicate: Google Chrome - Alphanumeric hashes to identify extensions I'm building a Chrome extension packager, and am trying to figure out how to programmatically generate the appID from the package contents. The appID is a 32-byte string consisting of lower-case letters, like these: According to the Chrome extension documentation, the appID is "generated based on a hash of the extension's public key," and is used to

How to generate the appID for a Google Chrome Extension [duplicate]

孤人 提交于 2021-02-07 08:31:10
问题 This question already has answers here : Closed 8 years ago . Possible Duplicate: Google Chrome - Alphanumeric hashes to identify extensions I'm building a Chrome extension packager, and am trying to figure out how to programmatically generate the appID from the package contents. The appID is a 32-byte string consisting of lower-case letters, like these: According to the Chrome extension documentation, the appID is "generated based on a hash of the extension's public key," and is used to