google-chrome-extension

chrome extension shadow DOM import boostrap fonts

大城市里の小女人 提交于 2021-01-27 19:02:17
问题 so I'd like to display bootstrap 3 icons in a shadowroot added from a chrome extension content script. So far its not working, help? manifest.js does include the woff file in web_accessible_resources shadow root has style tag with: @import url(chrome-extension://__MSG_@@extension_id__/fonts/glyphicons-halflings-regular.woff2); What am I missing? 回答1: To import a font, you should not use @import url which is used to import a CSS stylesheet. Instead, you should use the @font-face directive.

Can I set extension policies locally from the registry?

霸气de小男生 提交于 2021-01-27 17:32:46
问题 I have a Chrome Extension and I added a managed_schema to define a property (SomeSetting) so I can set it via a policy. manifest.json: "storage": { "managed_schema": "schema.json" } schema.json: "properties": { "SomeSetting": { "type": "string" } } I can see SomeSetting in chrome://policy/ but I have no idea how to set the value. Apparently I can do this at HKLM\SOFTWARE\Policies\Google\Chrome\3rdparty\extensions... but I tried and it never is shown as set in chrome://policy/. Does anyone

Best way to include data (that will populate IndexedDB) with offline HTML5 app?

寵の児 提交于 2021-01-27 14:27:19
问题 I'm building an offline HTML5 app (it will be delivered as a zipped up .crx file). It will be installed and used entirely offline. At no point will there be internet access. AFAIK, there is no way to include a pre-populated sqlite DB (and I know you cannot include an indexedDB), so all the data must be included outside a database, but accessible to the javascript code, and then on the first run, put into the database. What's the best way to do this? (Both from a development/maintenance

Google+ integration chrome extension issue

送分小仙女□ 提交于 2021-01-27 13:54:25
问题 I am trying to integrate google+ API with my google chrome extension. My integration based on this quick start example introduced here: https://developers.google.com/+/quickstart/javascript I have migrated all inline javascript code to separate files, added content_security_policy line in my manifest.json file: "content_security_policy": "script-src 'self' https://www.googleapis.com/ https://plus.google.com/ https://apis.google.com/ https://accounts.google.com/ https://ssl.gstatic.com https:/

Chrome extension: Prevent chrome.tabCapture.capture choppy sound by increasing buffer size?

ⅰ亾dé卋堺 提交于 2021-01-27 13:48:07
问题 It's seems like audio capturing using chrome.tabCapture.capture can produce some choppy sounds. There is already a bug report for this. Is it possible to increase the buffer that receives the captured stream in order to prevent the stutter, or does the tabCapture method already defines a buffer? Basic capturing: chrome.tabCapture.capture({ audio: true, video: false }, function (stream) { var ctx = new AudioContext(); var output = ctx.createMediaStreamSource(stream); output.connect(ctx

How to call a function from injected script?

痞子三分冷 提交于 2021-01-27 06:45:48
问题 This is code from my contentScript.js : function loadScript(script_url) { var head= document.getElementsByTagName('head')[0]; var script= document.createElement('script'); script.type= 'text/javascript'; script.src= chrome.extension.getURL('mySuperScript.js'); head.appendChild(script); someFunctionFromMySuperScript(request.widgetFrame);// ReferenceError: someFunctionFromMySuperScript is not defined } but i got an error when calling a function from injected script: ReferenceError:

Chrome extension browser action event not firing

ⅰ亾dé卋堺 提交于 2021-01-27 06:35:32
问题 I want to make chrome extension which opens all my favourite websites when I click on it. Currently my manifest.json is: { "manifest_version": 2, "name": "Soical_open", "description": "This extension opens all my favorite social sites once", "version": "1.0", "background": { "scripts": ["background.js"] } } and my background.js is: var queue = ['www.fb.com', 'www.gmail.com' , 'www.quora.com']; chrome.browserAction.onClicked.addListener(function(tab) { for (var i=0; i<queue[1].length; ++i)

Chrome extension browser action event not firing

非 Y 不嫁゛ 提交于 2021-01-27 06:35:02
问题 I want to make chrome extension which opens all my favourite websites when I click on it. Currently my manifest.json is: { "manifest_version": 2, "name": "Soical_open", "description": "This extension opens all my favorite social sites once", "version": "1.0", "background": { "scripts": ["background.js"] } } and my background.js is: var queue = ['www.fb.com', 'www.gmail.com' , 'www.quora.com']; chrome.browserAction.onClicked.addListener(function(tab) { for (var i=0; i<queue[1].length; ++i)

React tab doesn't appear in chrome developer tools

帅比萌擦擦* 提交于 2021-01-20 18:47:13
问题 I have installed React Developer Tools Chrome browser extension. But i cannot see the React tab in developer tools instead there are new tabs named "Components" & "Profiler". I re-installed the extension, restarted the browser and computer, checked "Allow access to file URLs" under chrome://extensions/ . I navigated to a url with react https://reactjs.org/tutorial/tutorial.html & yet react tab doesn't appear. However the chrome plugin (react detector in top right of the browser) indicates

using WebAssembly in chrome extension

扶醉桌前 提交于 2021-01-20 14:32:58
问题 I have a chrome extension that includes a complicated function comp_func(data) which takes a lot of CPU by performing many bitwise operations. Because of that, I'm trying to use WebAssembly. I've tried to follow several tutorials, for example this one and this one. The first link says: fetch('simple.wasm').then(response => response.arrayBuffer() ).then(bytes => WebAssembly.instantiate(bytes, importObject) ).then(results => { results.instance.exports.exported_func(); }); but I get an error: