google-chrome-extension

I can edit the content before printing?

青春壹個敷衍的年華 提交于 2019-12-24 19:12:24
问题 The first chrome plugin to work. I do not have detailed information. Before I print the contents of This link I want to get the specific part. <table class="receiptSectionTable2Col" > just how can I print the contents of this table. Is this possible? 回答1: I think this answer from this question will help you: HTMLElement.prototype.printMe = printMe; function printMe(query){ var myframe = document.createElement('IFRAME'); myframe.domain = document.domain; myframe.style.position = "absolute";

Access NPAPI from pages DOM

喜夏-厌秋 提交于 2019-12-24 18:52:53
问题 I'm attempting to override the default functionality for webkitNotifications.createNotification and via a Chrome extension I'm able to inject a script in the pages DOM that does so. Problem I'm having now is I need access to chrome.extension.sendRequest from the pages DOM in order to push my request to the NPAPI I have embedded in the background page. I previously had the embed object rendered on each page during the execution of the content-script - but believe it's more effective (and safe)

How chrome extension download images to extension root directory

六月ゝ 毕业季﹏ 提交于 2019-12-24 17:53:07
问题 I'm making a chrome extension for the first time. For my extension, I want it can automatically download images to its extension folder. For example, if the extension folder is /xxxx/abc/ , I want it can download images to /xxxx/abc/image/ . To make it, I don't know how to write file/ download image to this directory. I don't want users notice this. I found an extension can make it. It's called Momentum. It can download images to /xxxx/<extension root dir>/backgrounds/ . Can anybody tell me

How chrome extension download images to extension root directory

杀马特。学长 韩版系。学妹 提交于 2019-12-24 17:53:04
问题 I'm making a chrome extension for the first time. For my extension, I want it can automatically download images to its extension folder. For example, if the extension folder is /xxxx/abc/ , I want it can download images to /xxxx/abc/image/ . To make it, I don't know how to write file/ download image to this directory. I don't want users notice this. I found an extension can make it. It's called Momentum. It can download images to /xxxx/<extension root dir>/backgrounds/ . Can anybody tell me

TypeError: browser is undefined (Web Extension Messaging)

て烟熏妆下的殇ゞ 提交于 2019-12-24 17:16:09
问题 I am trying to communicate my web page script with my content script of my web extension with the code below Web Page Script const browser = window.browser || window.chrome; browser.runtime.sendMessage(message, function (response) { console.log(response); } ); However, I keep getting the error TypeError: browser is undefined . The same goes if I use chrome.runtime.sendMessage() instead. How am I supposed to use this method? 回答1: The issue here is that user/webpage scripts (unprivileged

Custom Extensions on Managed Chromebooks

怎甘沉沦 提交于 2019-12-24 16:32:21
问题 I am a developer looking for the best way to set up different schools with their own custom, private extensions (ie School A should be the only one with access to Extension A). Theoretically, I am aware that there are a few ways to get a custom, private extension pushed out on a domain: Host the .crx on a server and click "Specify a Custom App" in the management console. Create a Domain App by uploading a zip to the Chrome Web Store Upload the extension from my developer account to the Chrome

chrome extensions Uncaught ReferenceError: $ is not defined

半世苍凉 提交于 2019-12-24 16:26:27
问题 I am trying to make a chrome extension that uses an external javascript file that uses jQuery. But I keep getting this silly error. Screenshot of error in chrome inspector. Any help is appreciated thanks! popup.js $(document).ready(function() { $.ajax({url: "http://www.google.com", success: function(result) { $("#report-details").html(result); }}); }); popup.html <!doctype html> <html> <head> <title>TEST</title> <script src="popup.js"></script> <script src='./js/jquery.min.js'></script>

Chrome extension file upload browse window position off screen

 ̄綄美尐妖づ 提交于 2019-12-24 16:17:11
问题 I am having an issue with the file browse dialog window appearing off the screen on a Mac when attempting to upload a file within a Google Chrome extension I am developing. Does anyone have any ideas as to how to reposition the dialog window or append the file upload to the main window so it centers with that window? I followed this question to do my uploads. Any help appreciated! Thank you! My manifest.json: { "manifest_version": 2, "name": "Bookmark and Binder", "description": "example",

Chrome extension open new window behind the current window

梦想的初衷 提交于 2019-12-24 16:08:14
问题 i have a chrome extension which automatically open a window using window.open(); when user open some specific websites. what i want is the new window which i open from the background script through window.open() should be displayed behind the current webiste opened by the user. i have tried window.open properties like alwaysLowered=1, z-lock=1 etc. but not working. Also tried..... var w = window.open('url'); if(w){ w.blur(); window.focus(); } all these have no effect on chrome. can anybody

Approaches of detection of custom protocol in chrome and Safari browsers

一世执手 提交于 2019-12-24 16:06:11
问题 What could be the best way the detecting the custom protocol (like foo://) in Safari and chrome browser. I was looking at the following options: Browser extension which can check the existence of custom protocol invoker software. (Not sure if it is possible and how to do it) Browser plugin or java applets( since NPAPI is now going to deprecated so probably this will not be good idea). Flash Action script with java script(since Flash is sand boxed then again it seems not good idea to use it)