google-chrome-extension

Do Chrome extensions have access to Chrome apps?

邮差的信 提交于 2019-12-20 02:32:14
问题 For security considerations I am wondering if Chrome extensions had access to an app. I design a Chrome App which handles sensitive data. As far as I understand it, that app runs in a sandboxed environment which should be fairly isolated. If a user had by mistake installed a malicious Chrome extension, would that extension be able to intercept/modify any of the sensitive data in the app? Please note that I do not consider other ways of interceptions outside of the Chrome environment, e.g.

chrome extension popup textarea focus

笑着哭i 提交于 2019-12-20 01:45:26
问题 It seems that i cannot call focus() on a textarea of my chrome extensions popup when it gets opened / after ondomready. i have something like that in popup.js : $(document).ready(function () { console.log($("#moped-text")); $('textarea').focus(); $('.container').css("color", "red"); }); i reference it in popup.html like that: <html> <head> <link rel="stylesheet" href="css/content.css" type="text/css"> <script type="text/javascript" src="js/lib/jquery.js"></script> <script type="text

Firefox WebExtension: Check if MY extension exists

大城市里の小女人 提交于 2019-12-20 01:40:57
问题 Porting extension from Chrome into FF Followed this tutorial (which works fine in Chrome): http://www.codingscripts.com/check-whether-user-has-a-chrome-extension-installed/ Sending message from webpage to extension: In (web)pagescript.js this has: function IsExist(extensionId,callback){ chrome.runtime.sendMessage(extensionId, { message: "installed" }, function (reply) { if (reply) { callback(true); }else{ callback(false); } }); } IsExist("Your extension id",function(installed){ if(!installed)

Pass a message from Chrome Extension to Webpage

蓝咒 提交于 2019-12-19 20:37:32
问题 I need to pass a message (raise an event) in a Chrome extension, and have JavaScript on a webpage react to it. In content_script.js of the extension, there should be a function like raiseXYZevent(data); JavaScript on the webpage http://foo.com/mypage.html should execute a handler function processXYZevent(data) { ... } The problem is that content script within an extension cannot interact with JavaScript on the webpage directly (it can only modify DOM). Is there a way to make DOM changes from

Pass a message from Chrome Extension to Webpage

与世无争的帅哥 提交于 2019-12-19 20:37:08
问题 I need to pass a message (raise an event) in a Chrome extension, and have JavaScript on a webpage react to it. In content_script.js of the extension, there should be a function like raiseXYZevent(data); JavaScript on the webpage http://foo.com/mypage.html should execute a handler function processXYZevent(data) { ... } The problem is that content script within an extension cannot interact with JavaScript on the webpage directly (it can only modify DOM). Is there a way to make DOM changes from

Using Facebook sdk with Chrome Extensions

梦想的初衷 提交于 2019-12-19 19:58:52
问题 Popup.js file: window.fbAsyncInit = function() { // init the FB JS SDK FB.init({ appId : ******, // App ID from the app dashboard status : true, // Check Facebook Login status xfbml : false // Look for social plugins on the page }); }; // Load the SDK asynchronously (function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) { return; } js = d.createElement(s); js.id = id; js.src = "https://connect.facebook.net/en_US/all.js"; fjs.parentNode.insertBefore(js, fjs

Using Facebook sdk with Chrome Extensions

夙愿已清 提交于 2019-12-19 19:58:00
问题 Popup.js file: window.fbAsyncInit = function() { // init the FB JS SDK FB.init({ appId : ******, // App ID from the app dashboard status : true, // Check Facebook Login status xfbml : false // Look for social plugins on the page }); }; // Load the SDK asynchronously (function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) { return; } js = d.createElement(s); js.id = id; js.src = "https://connect.facebook.net/en_US/all.js"; fjs.parentNode.insertBefore(js, fjs

chrome.windows.onFocusChanged.addListener not firing on tab switching

寵の児 提交于 2019-12-19 19:15:03
问题 I am trying to fetch all events (maximized, maximize etc). I have a suitable code for this from this link How to Detect Window On Minimize/Maximize Event in Chrome Extension?. But the problem when switch tab (using alt+tab) window.chrome.onFocusChanged listener is not firing. My code : chrome.windows.onFocusChanged.addListener(function(windowId) { console.log("focus change", windowId); }); Is there a solution for this or... it is a bug? 回答1: This is a confirmed bug which was already posted at

chrome.windows.onFocusChanged.addListener not firing on tab switching

不打扰是莪最后的温柔 提交于 2019-12-19 19:14:29
问题 I am trying to fetch all events (maximized, maximize etc). I have a suitable code for this from this link How to Detect Window On Minimize/Maximize Event in Chrome Extension?. But the problem when switch tab (using alt+tab) window.chrome.onFocusChanged listener is not firing. My code : chrome.windows.onFocusChanged.addListener(function(windowId) { console.log("focus change", windowId); }); Is there a solution for this or... it is a bug? 回答1: This is a confirmed bug which was already posted at

chrome.windows.onFocusChanged.addListener not firing on tab switching

£可爱£侵袭症+ 提交于 2019-12-19 19:14:05
问题 I am trying to fetch all events (maximized, maximize etc). I have a suitable code for this from this link How to Detect Window On Minimize/Maximize Event in Chrome Extension?. But the problem when switch tab (using alt+tab) window.chrome.onFocusChanged listener is not firing. My code : chrome.windows.onFocusChanged.addListener(function(windowId) { console.log("focus change", windowId); }); Is there a solution for this or... it is a bug? 回答1: This is a confirmed bug which was already posted at