google-chrome-extension

Chrome Extension - No base href set. Please provide a value for the APP_BASE_HREF

假装没事ソ 提交于 2019-12-22 04:56:40
问题 I am building a Chrome Browser Action Extension. I am attempting to load an Angular 2 application into the Popup Window in Chrome. I have done this before using Angular 1.5, but attempting with Angular 2 and getting an error. Unhandled Promise rejection: No base href set. Please provide a value for the APP_BASE_HREF token or add a base element to the document. ; Zone: ; Task: Promise.then ; Value: Error: No base href set. Please provide a value for the APP_BASE_HREF token or add a base

Dynamic loading of content script (chrome extension)

巧了我就是萌 提交于 2019-12-22 04:50:34
问题 I have an chrome extension, with 2 content script injected by manifest and one background script. { "manifest_version": 2, "name": "Test", "permissions": [ "tabs", "<all_urls>", "activeTab", "storage" ], "content_scripts": [ { "matches": ["http://*/*", "https://*/*"], "js": [ "content/autofill/lib_generic.js", "content/autofill/lib.js"], "run_at": "document_end" } ], "web_accessible_resources": [ "content/specific_scripts/*" ], "background": { "scripts": ["background.js"], "persistent": false

Detect if Rich Notifications in Chrome are available

旧时模样 提交于 2019-12-22 04:47:14
问题 My Chrome extension makes heavy use of webkitNotifications. I want to switch to the new rich notifications (chrome.notifications) but those aren't available on all platforms yet and at the moment of writing only in the beta channel and up. If the rich notifications aren't available webkitNotifications should be used as fallback. Thus I'm looking for the best solution to implement this: if(richNotificationsAvailable()) chrome.notifications.create(...); else webkitNotifications

javascript text selection events

荒凉一梦 提交于 2019-12-22 04:06:40
问题 This is not just for google chrome extension but also for javascript I am writing a chrome extension in which when a text is highlighted and a context menu is shown i display my item in the context menu which when clicked should process the selected text after bringing up the context menu and selecting my option i get empty object with all values zeros and nulls so i want to implement some mechanism which will buffer the text selection as soon as the user releases the mouse after selecting

Chrome extension post-install hook/API function: does it exist?

人走茶凉 提交于 2019-12-22 03:24:50
问题 Is there a Chrome extension post install hook/API function that will let me perform an action after the plugin is installed or updated? I would like to perform an action after my extension is installed, and only right after it is installed. This action should only be performed once (post-install or post-update) of the extension. Update Some people have proposed setting the version of the extension in localStorage, the problem that I have is that the content script that has access to

SSML using Chrome TTS

百般思念 提交于 2019-12-22 03:23:07
问题 I'm trying to give a little more clarity to TTS sentences by indicating emphasis, etc. I'm using the Chrome TTS API, which indicates that it accepts SSML-formatted documents in addition to raw text. After many attempts, and a reading a few comments on the web, it doesn't look like this is actually supported, or possibly that this is up to individual voices for implementation. Does anyone know: Has SSML been abandoned under Chrome? If not, is there any indication whether they expect to support

Loading iframe in google-chrome extension (Error: Protocols must match)

痞子三分冷 提交于 2019-12-22 01:36:29
问题 Code in manifest.json: { "name": "Test", "version": "1.0", "manifest_version": 2, "description": "Test", "browser_action": { "default_icon": "icon.png", "default_popup": "popup.html" }, "permissions": [ "notifications", "https://www.roblox.com" ], "background": { "scripts": ["background.js"] }, "content_security_policy": "script-src https://www.roblox.com 'self' ; object-src 'self'", "web_accessible_resources": [ "icon.png" ] } Code in background.js: var iframe = document.createElement(

Read Chrome browsing history within extension

夙愿已清 提交于 2019-12-22 01:20:15
问题 How can I check if a certain link is found in Chrome's browsing history(on the computer that accesses the link) using JavaScript or jQuery? I am interested (if any) in the functions that I have to use. Also how can I get the date and time of the accessed link? 回答1: Retrieving the users history from javascript launched from a web page is impossible due to obvious blatant security issues. Retrieving the users history from javascript running in an extension is possible, but doing so requires

Simulate clicking elements on the page from a Chrome extension?

倾然丶 夕夏残阳落幕 提交于 2019-12-22 01:07:42
问题 I need to iterate and click all the elements with the class .star_gray on page, and keep the iteration and clicking going after redirection. Running JavaScript code cannot meet the second requirement, so I plan to write a Chrome Extension. But I failed to simulate clicking events on web pages via the extension. My project is as below: manifest.json { "manifest_version": 2, "name": "Check'em All", "description": "", "version": "1.0", "browser_action": { "default_popup": "popup.html" },

Native app does not work in Chrome extension

天涯浪子 提交于 2019-12-22 01:05:10
问题 I am trying Chrome Native Messaging API for Chrome extension. Manifest.json for native app: { "name": "app.native", "description": "Native Message API Test.", "path": "native.exe", "type": "stdio", "allowed_origins": ["chrome-extension://kembignchdjhopkkcolnamikcenaocdm/"] } Windows Registry value: HKEY_LOCAL_MACHINE\SOFTWARE\Google\Chrome\NativeMessagingHosts\app.native=D:\connectNative\manifest.json I also tried D:\\\\connectNative\\\\manifest.json And I add "nativeMessaging" to