google-chrome-extension

Chrome Extension HTML Filesystem Access

耗尽温柔 提交于 2020-01-10 02:16:09
问题 I am looking to save a file to a local path. I have the weblink for example (http://www.website.com/files/info.pdf) and a config setting storing the users desired path (defaulted to download directory, but they can change it. Everything I am reading implies this functionality now exist but I cannot figure out how to do it. Thanks 回答1: Chrome doesn't allow you to write directly to the filesystem. It provides an API that gives you access to a sandboxed environment, but doesn't allow you to

Chrome - Debug Angular/Typescript - how to navigate to ts file

徘徊边缘 提交于 2020-01-10 01:06:28
问题 To debug my angular front end, I open the dev tools in Chrome and the sources tab and navigate to the ts file by clicking down through all the folders and when I do find the ts file, I then set a breakpoint. and go back to using the application and then start debugging. While this works, it is time consuming to have to drill down through folders... and look for the ts file. As the project has grown, I find it is becoming even more time consuming. I also have to remember which TS file is

Chrome - Debug Angular/Typescript - how to navigate to ts file

痞子三分冷 提交于 2020-01-10 01:06:10
问题 To debug my angular front end, I open the dev tools in Chrome and the sources tab and navigate to the ts file by clicking down through all the folders and when I do find the ts file, I then set a breakpoint. and go back to using the application and then start debugging. While this works, it is time consuming to have to drill down through folders... and look for the ts file. As the project has grown, I find it is becoming even more time consuming. I also have to remember which TS file is

Howto send a message from content-script to inactive popup, chrome extension

一笑奈何 提交于 2020-01-09 13:08:28
问题 I want to log text on any webpage (using content-script to handle selection) into a database that is popup's resource in order to collect text in one place. what i am trying I create a database in popup page and try to manage it from content-script though popup is not active (not opened) by using chrome messaging but cannot make the popup receives any message from content-script. I'm not sure about using messaging to solve this problem. Is there any better solution? 回答1: A content script

Howto send a message from content-script to inactive popup, chrome extension

点点圈 提交于 2020-01-09 13:05:10
问题 I want to log text on any webpage (using content-script to handle selection) into a database that is popup's resource in order to collect text in one place. what i am trying I create a database in popup page and try to manage it from content-script though popup is not active (not opened) by using chrome messaging but cannot make the popup receives any message from content-script. I'm not sure about using messaging to solve this problem. Is there any better solution? 回答1: A content script

Can I inject a CSS file programmatically using a content script js file?

自作多情 提交于 2020-01-09 09:02:23
问题 Can I inject a CSS file programmatically using a content script js file? It is possible for me to inject the css when the js file is linked to my popup.html. The problem is I have to click on the button to open the popup to inject the css. I want it to happen automatically and in the background. What happens in my code... Get a variable from a MySQL database through a XMLHttpRequest Call the function, "processdata()" "processdata" Will process the data from the XMLHttpRequest. More

Very Slow to pass “large” amount of data from Chrome Extension to Host (written in C#)

孤人 提交于 2020-01-09 08:06:50
问题 I am using Chrome's Native Messaging API to pass the DOM of a page to my host. When I try passing a small string from my extension to my host, everything works, but when I try to pass the entire DOM (which isn't that large...only around 260KB), everything runs much slower and I eventually get a Native host has exited error preventing the host from responding. My main question: Why does it take so long to pass a 250KB - 350KB message from the extension to the host? According to the developer's

CORS Chrome Extension with manifest version 2

随声附和 提交于 2020-01-09 07:31:05
问题 Is it possible to use CORS when writing a google chrome extension? I saw this, http://developer.chrome.com/extensions/contentSecurityPolicy.html And I tried inserting this into the manifest, "content_security_policy": "script-src 'self' https://twitter.com/; object-src 'self'", but an ajax requestion fails with XMLHttpRequest cannot load https://twitter.com/. Origin chrome-extension://olimhkjfpndfhdopbneamnekfalckinc is not allowed by Access-Control-Allow-Origin. 回答1: To enable cross-origin

Debugging Chrome extension with access to chrome.devtools api

随声附和 提交于 2020-01-09 06:55:13
问题 I am beginner in Chrome extensions development. I need to extend existing extension (angularjs-batarang), but I have some problems with debugging. manifest.json has entries: "background": { "page": "background.html" }, "devtools_page": "devtoolsBackground.html" The question is: how to debug devtools_page ? I added to manifest.json additional entry "options_page": "devtoolsBackground.html" and when I add this extension to Chrome I have possibility to run options page from chrome://extensions .

Can a website block a Chrome Extension? [duplicate]

狂风中的少年 提交于 2020-01-09 06:26:49
问题 This question already has answers here : Blocking Chrome Extensions from running on my site (2 answers) Closed 6 years ago . Is it possible to block Chrome Extensions from running on particular websites? Say I have a website www.foo.com, is it possible for me to block Chrome Extensions (in particular, content scripts) from working on my website, or stop them from accessing the DOM? 回答1: For the short Answer to the question goto the 4th Edit: You need to know the extensionId from the Extension