google-chrome-extension

Local Chrome extension to set file of input type=“file”

那年仲夏 提交于 2019-12-29 07:50:09
问题 I'am developing an Extension for Chrome browser. I wan't to choose a file from a input type="file" html element using the extension. But I know this is not possible due to security restrictions. Is there a way to remove the security restrictions of Chrome related to this issue so that this will be possible. Thanks. 回答1: Ok i'm going to answer my own question. First of all thank Michael Dibbets and wtjones for your answers. --disable-web-security and --allow-file-access-from-files did not work

how to disable chrome extension in selenium

早过忘川 提交于 2019-12-29 07:47:07
问题 I am trying to disable all chrome extensions when starting up my selenium chrome. But all extensions keep starting up each time I run the code. Is there a way of disabling the extensions. Sample Code public static void main(String[] args) throws IOException { System.setProperty("webdriver.chrome.driver", "C:\\Selenium\\chromedriver.exe"); DesiredCapabilities capabilities = DesiredCapabilities.chrome(); capabilities.setCapability("chrome.binary", "C:\\Users\\ngzhongqin\\AppData\\Local\\Google\

How can I launch a Chrome Packaged App through javascript?

允我心安 提交于 2019-12-29 07:17:09
问题 I want to be able to launch my packaged chrome app via javascript either on-page or through an extension. Am I able to do this? I have done a fair amount of research with no answer in either direction. Can somebody at least point me in the right direction? 回答1: chrome.management.launchApp can be used to launch an app in an extension. The API reference is available here: https://developer.chrome.com/extensions/management.html#method-launchApp. 回答2: You can make certain resources in your

Google Chrome: JQuery content script on Facebook

狂风中的少年 提交于 2019-12-29 07:06:07
问题 I am using Google Chrome and I'm writing a browser extension. I'm trying to inject JQuery 2.0.3 into facebook as a context script. Just to see if I could, I'm trying to grab the text area on the message page. I'm typing this line directly into the Javascript console: $('textarea[name="message_body"]'); Instead of getting a JQuery object I'm getting this error: Error: <![EX[["Tried to get element with id of \"%s\" but it is not present on the page.","undefined"]]]> Does facebook have anti

What can I use with Web Workers?

青春壹個敷衍的年華 提交于 2019-12-29 05:45:10
问题 I have a few questions about web workers Does the worker have access to storage? E.g. indexedDB/webSQL and local storage of the file the worker was initiated from? How can i include a file in a worker? I have a functions.js which has alot of quick app related functions and it really wont make sense to copy paste the file's contents in a worker only to have two different places up update my functions. Can I have a DOM inside a worker? like load an audio file in a temp audio tag to read its

Run Javascript in Chrome Extension -> Basic?

痴心易碎 提交于 2019-12-29 05:36:13
问题 I get the feeling I'm missing something very obvious, but I've been looking everywhere and can't seem to make this work. In short, I want to turn a small Javascript script into a chrome extension to make it easier to use. The script just reads text from a textArea, modifies the script and outputs it into a div. It works perfectly with any browser when running standalone, but doesn't seem to want to work when ran as a Chrome extension Here are the files (I'm basically trying to convert the

Background.js not working Chrome Extension

与世无争的帅哥 提交于 2019-12-29 05:30:06
问题 I'm new to chrome extensions and cannot seem to figure out how the background concept works. I am building a counter extension that keeps counting even when the user closes the extension (but not the browser) and wanted to do a simple test to see if I could figure out how to use the background file. Below is my attempt to create a function that activates everytime a user clicks on a tab (outside of my extension) and when they click on 5 tabs, the alert hits. I cannot figure out why this doesn

Adding context menu item on a non-persistent background script?

£可爱£侵袭症+ 提交于 2019-12-29 05:24:52
问题 I am adding a context menu item from a non-persistent background script using: chrome.contextMenus.create({ title: 'Get Code', id: 'myUniqueIdForThisExtension123', contexts: ['all'], onclick: onClickHandler }); function onClickHandler() {} The documentation simply states: The unique ID to assign to this item. Mandatory for event pages. Cannot be the same as another ID for this extension. So I added a unique ID, but I still cannot make it work. Nothing new inserted on the context menu. 回答1:

Google Chrome Extension: Print the page silently

守給你的承諾、 提交于 2019-12-29 04:14:07
问题 I'm developing an internal Google Chrome Extension that needs a way to initiate print the current page to the printer. I do not want the default Print dialog to come up (so, javascript:window.print() is out of question). As far as I understand, this is not possible just with the JS + HTML plug-in, so I'm also open to using the NPAPI plugin also (with a dummy mime-type). And I'm concerned for Windows platform only. I'm also open for various hacks / workarounds if possible, though a standard

Storage of passwords in Google Chrome Extension

六眼飞鱼酱① 提交于 2019-12-29 04:13:05
问题 I started reading Google Chrome's documentation, and liked it's approach of using HTML and Javascript to create extensions. Reading this tutorial about Local Storage made me think about a lot of different uses. I want to develop an extension to help me with corporate systems. It's very specific, and it's only going to be used inside a company. This extension would do some activities to this corporate system, using javascript DOM, with just one click on Google's Chrome toolbar. To work with