google-chrome-extension

Obtaining Chrome Extension ID for development

落花浮王杯 提交于 2019-12-16 20:13:59
问题 Although similar to this SO question, I am not asking: Under what conditions does an extension's ID change? nor How can I upload my zip archive to the Chrome Dashboard? I am however asking, how I can obtain an extension's key without using the Chrome Dashboard. Therefore, I do not consider it a duplicate of this SO question. The documentation for using Google Identity inside a Chrome extension states the need to copy an extensions's key to its manifest file. To keep your application ID

pagination Chrome web scraper

怎甘沉沦 提交于 2019-12-16 18:05:35
问题 I have the data and it works perfectly. But I can't get the scraper to navigate to the next page. Does anyone know where I should put the "next page" link? Here's the graph/map enter link description here Thank you 回答1: There are two {1 & 2} Chrome scraper plugins avail. None of them manages pagination. See their use cases: 1 (see comments there too) and 2. 来源: https://stackoverflow.com/questions/30084604/pagination-chrome-web-scraper

chrome extension crashes when i try to upload a big file

假装没事ソ 提交于 2019-12-14 04:04:39
问题 The extension crashes when it executes such code: /*this object is created in content script and passed t background script*/ var myurl = URL.createObjectURL(document.getElementById('myfile').files[0]); /*code block from background script, it work good if file size is < 50MB, if bigger then extension will crash*/ var x = new XMLHttpRequest(); x.onload = function() { var uploadfile = new Uint8Array(x.response); var somearray1 = [...]; var somearray2 = [...]; var size = somearray1.length +

“Attempting to use a disconnected port object” while sending message from content to popup in Chrome extension

∥☆過路亽.° 提交于 2019-12-14 04:01:09
问题 So, I need to pass messages from popup to content and vice versa. Currently here is what I am doing now, but this does not work how it's supposed to work: manifest.json: { // Required "manifest_version": 2, "name": "Extension name", "version": "0.1", "content_scripts": [ { "matches": ["*://*/*"], "js": ["content.js"] } ], "browser_action" : { "default_title" : "Extension name", "default_popup" : "popup.html" }, "permissions": [ "tabs", "*://*/*", "contextMenus" ] } popup.js var port = "";

How to call exported function in a DLL(written using C), from chrome extensions

三世轮回 提交于 2019-12-14 04:01:09
问题 I wanted to call one exported function in a Dll written using C Language from my chrome extensions. But not getting sufficient info on how to do that. In Firefox I am using below mention code in my extensions js file to do so, but same is not working in chrome. var InstallPath="C:\\FRViewPortExtn.dll"; Components.utils.import("resource://gre/modules/ctypes.jsm"); var lib = ctypes.open(InstallPath); /* Declare the signature of the function we are going to call */ passBrowserResizeData = lib

xmlhttprequest not firing response event handler for ready state 3 when using flush from php

牧云@^-^@ 提交于 2019-12-14 03:58:55
问题 I am sending a request a remote server from google chrom extension using xmlhttprequest I have set permissions in the manifest.json to access remote hosts Basically it is working fine as expected. what i had expected is readystate 4 it is fired when the response has completed. Since it is a 8 to 10 second process in the server side i use echo from the server side to the client for status update. so i use readyState==3 condition to show server response but when i tested readystate 1 and 4 are

Use `chrome.devtools.panels.create()` in Chrome Extension content script

ぃ、小莉子 提交于 2019-12-14 03:57:03
问题 I have this in a content-script: chrome.devtools.panels.create('Suman Extension Page Controls', 'icon.png', 'devtools-panel.html', function (panel) { console.log('my devtools panel.'); }); however, I get this error: Uncaught TypeError: Cannot read property 'panels' of undefined I tried adding "devtools" to the permissions array in my manifest.json file, but that's not allowed. Is there a way to use the devtools API from a content script? How do I dynamically add panels to DevTools on a random

how to attach debugger to device? chrome extention

我们两清 提交于 2019-12-14 03:52:41
问题 This is the code from my chrome extension, as far as i am aware it should return all targets that i can attach a debugger to: chrome.browserAction.onClicked.addListener(function(tab) { console.log('launching extention'); chrome.debugger.getTargets(function(result){ console.log('Result!'); console.log("count: "+result.length); for (index = 0; index < result.length; index++) { console.log(index+": "+result[index].url); } }); }); This is my console output from the above extension: This shows

How to get a paragraph from the active tab with chrome extension?

廉价感情. 提交于 2019-12-14 03:52:39
问题 In my background.html I am getting the id , url , and title of the current tab like this: chrome.tabs.getSelected(null, function(tab) { tabId = tab.id; tabUrl = tab.url tabTitle = tab.title ... I also need to get the first paragraph of the current tab. Is this possible? I don't see anything related in the tab type. Thanks Update Update in response to serg's answer and copying the code from here: This is dom.js : chrome.extension.onRequest.addListener(function(request, sender, sendResponse) {

How do you use the Facebook Graph API in a Google Chrome Extension?

吃可爱长大的小学妹 提交于 2019-12-14 03:49:33
问题 I have been trying to access the information available when using the https://graph.facebok.com/id concept through JSON but have been unable to call or return any information based on different snippets of code I've found around. I'm not sure if I'm using the JSON function correctly or not. For example, var testlink = "https://graph.facebook.com/"+id+"/&callback=?"; $.getJSON(testlink,function(json){ var test; $.each(json.data,function(i,fb){ test="<ul>"+json.name+"</ul>"; }); }); In this