google-chrome-extension

Is it possible to execute another chrome extension using your own chrome extension?

柔情痞子 提交于 2019-12-13 07:25:43
问题 Essentially I want to be able to program my own extension to trigger another extension for certain purposes. Is this even possible? 回答1: If you want to manage other extensions, you could take a look at chrome.management, for your case, I believe you'd like to check management.setEnabled, it allows you to enable/disable another extension. If you mean to communicate with an running extension for message passing and you have control on both of the two extensions, you could use Cross-extension

Add items to tab's context menu in Google Chrome

狂风中的少年 提交于 2019-12-13 07:25:37
问题 In Google Chrome web browser I would like to add options such as "Bookmark Selected Tab", "Close tab to the left" to the tab's context menu. Is it possible? If possible, what is the API I must check? 回答1: No, it's not possible. The closest API that exists is contextMenus API. However, if you look at the available "contexts" (objects whose menu you can change), there is no "tab" there. So, at least currently, you can't modify a tab's context menu. 来源: https://stackoverflow.com/questions

Parameter passed without explicitly stating javascript Chrome extension

本秂侑毒 提交于 2019-12-13 07:13:08
问题 So this example chrome extension calls a selector for media streams and then the gotStream(stream) clearly is looking for a parameter of a mediaObject. However, when the gotStream function is passed in as the second parameter to navigator.webkitGetUserMedia no parameter is passed in. It merely remains states the function name. Here is the code function gotStream(stream) { console.log("Received local stream"); var video = document.querySelector("video"); video.src = URL.createObjectURL(stream)

Automatically download and then upload a file in a chrome extension [duplicate]

回眸只為那壹抹淺笑 提交于 2019-12-13 07:09:59
问题 This question already has an answer here : Google chrome rehost image extension (1 answer) Closed 5 years ago . I'm writing a Chrome Extension that automates downloading a file from one location and then uploading it to another. I've figured out how to do the download part using the HTML5 Filesystem API. However, I don't know how to then upload the file. The issue is that the upload has to be done through a form using a "file" input element. I'd like to just tell the form where the file is

How to convert/update already published legacy packaged app into new version of packaged app?

倾然丶 夕夏残阳落幕 提交于 2019-12-13 07:05:33
问题 I published a packaged app years ago. Now, Google introduces a new packaged apps concept and all published packaged apps are recognized as legacy. I've aligned my application with the new concept but when I'm trying publish the app to Chrome Store it always fails on: An error occurred: Item type may not be changed after initial upload. Is there a way how to convert/update an existing packaged app on new concept? 回答1: At the moment there is no way to change the type. Note that new-style

Strange chrome extension issue: injecting iframes into gmail [duplicate]

安稳与你 提交于 2019-12-13 06:54:03
问题 This question already has answers here : Injecting iframe into page with restrictive Content Security Policy (3 answers) Closed 4 years ago . The problem: a Chrome sidebar For a long time, I've wanted a Chrome extension that puts other content in a sidebar within Gmail, much like the Remember the Milk Gmail extension. It seems I'm not alone2 but the Chrome devs have made this functionality much more difficult than, say, Firefox3. After failing to make several hacks and workarounds function, I

Extension: chrome.storage SET

风流意气都作罢 提交于 2019-12-13 06:53:44
问题 Hello everyone :) my other post where we solved the GET. Ok, I got the base working once again - i think. Now I really don't know how the SET command of chrome storage works. This should set/save the value that is in a box with this ID: "ts_id_js_html" var input_id = document.getElementById("ts_id_js_html").value; chrome.storage.local.set({"ts_id_js": input_id}); This is where it (should)get the Value from: <form> <input id="ts_id_js_html" type="text" value="128856"></input> <button id=

Chrome extension: function must be called during a user gesture

爱⌒轻易说出口 提交于 2019-12-13 06:53:22
问题 In a Chrome Extension I want to ask the user for full access to pages through a browser_action's popup's link (aka a toolbar popup with a link). When the user clicks the link, I get this error: runtime.lastError while running permissions.request: This function must be called during a user gesture Yet the user actually clicked the link and the 'user gesture'. Any ideas of how to debug what is considered a user gesture? On the button click, I request full access via chrome's chrome.permissions

Passing message from one listener to another

a 夏天 提交于 2019-12-13 06:53:07
问题 I'm developing an extension for Chrome, and here's the workflow I'm trying to achieve: popup sends message -> content script 1 listens -> content script 1 sends message -> content script 2 listens -> content script 2 performs action In concept it's fine and dandy; what I've done is set up 2 listeners: one in each content script: Popup: chrome.tabs.query({active: true, currentWindow: true}, function(tabs) { console.log('popup send request'); chrome.tabs.sendMessage(tabs[0].id, obj); });

Fixed window size in a chrome extension

喜欢而已 提交于 2019-12-13 06:48:43
问题 I'm building a Google Chrome Extension. I want to create a popup window using the chrome.windows.create API. Everything works but I don't know how to create the window with fixed size( user can't resize the window, also the maximize button should be disabled). Is it possible to do this? 回答1: Modern browsers such as Google Chrome tend not to allow this because it is seen as a user unfriendly limitation. Still, you can force a window to keep its initial size using jquery as showed it this