userscripts

Why is usage of the downloadURL & updateURL keys called unusual and how do they work?

≡放荡痞女 提交于 2019-11-27 19:04:00
I was reading GM's wiki to determine the difference between @downloadURL & @updateURL (which I didn't). But what confused me even more that both are unadvised: It is unusual to specify this value. Most scripts should omit it. I'm surprised by that as it's the only way for scripts to auto-update and I don't see why these keys shouldn't be used. The wiki itself is pretty lacking and no other forum sources are advised, so I have to ask here. Also would appreciate more detailed info on these keys. Brock Adams Use of those keys is discouraged mainly by Greasemonkey's lead developer. Most others,

Can I modify chrome://extensions/ page with JavaScript(user script)?

人盡茶涼 提交于 2019-11-27 16:23:15
I'd like to use JavaScript to add a search bar for chrome://extensions/ page, so I created a file called test.user.js, and write scripts in it: // ==UserScript== // @name chromeex // @namespace chromeex // @version v1.0 /* @reason * just a test * @end */ // @match chrome://extensions/ // // ==/UserScript== (function(){ alert("haha"); }()); But when I load it in Chrome, it said Invalid header, finally I found out that it's @match chrome://extensions/ that cause the error. Is there a walkaround for this? A Chrome extension won't execute in the chrome://extensions/ directory or on the Chrome Web

Clicking a button on a page using a Greasemonkey/userscript in Chrome

試著忘記壹切 提交于 2019-11-27 16:10:47
I'm going to be as absolutely verbose here as possible as I've run into a few solutions that didn't end up panning out. Please keep in mind that I don't know Javascript . I know basic HTML and CSS. I don't have any actual programming background but I'm trying to learn bit by bit by researching basic tasks like this. Please talk to me like I'm an idiot. Any lingo I throw around in this post I learned while researching this specific issue. I'm writing this userscript as a personal project and to share with some friends. What I'm trying to do. I'm trying to write a userscript for Chrome

Chrome userscript error: “Unsafe JavaScript attempt to access frame”

六月ゝ 毕业季﹏ 提交于 2019-11-27 15:20:08
// the iframe of the div I need to access var iframe = document.getElementsByTagName("iframe")[2]; var innerDoc = iframe.contentDocument || iframe.contentWindow.document; // resize 'player' in the iframe innerDoc.getElementById('player').width = "1000px"; innerDoc.getElementById('player').height = "650px"; Running in a userscript for this url: http://www.free-tv-video-online.me/player/sockshare.php?id=24DA6EAA2561FD60 Why does Chrome come out with this error and fail the script?: Unsafe JavaScript attempt to access frame with URL http://www.sockshare.com/embed/24DA6EAA2561FD60 from frame with

How to use GM_xmlhttpRequest in Injected Code?

旧时模样 提交于 2019-11-27 15:11:52
I am writing a userscript that is injected into a webpage. The script reads some data from a web-server and I want to send messages to a listening application to react to the data. For now, all I'm doing is trying to send a string command to my listening application and see if I can read it. My code worked before it was injected, but afterwards I get an "undefined reference error". I suspect that this has something to do with this "Greasemonkey access violation" . However, I have been unable to find a solution that works. I'm developing in Chrome. Here is the section of code I can't get to

Chrome extension set to `run_at` `document_start` is running too fast?

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-27 13:11:49
问题 EDIT: Something was wrong with my Chrome browser and creating a conflict with my script, a full reinstall eliminated whatever the problem source was. If I happen to find out what was causing it I will include it in here. EDIT2: Just to let anyone reading this in 2017 know that I haven't forgotten this and I have never had this problem since my previous edit. EDIT3: It is 2019 and so far I've never had this problem again. I have been learning how to create a simple Chrome extension which is a

Gmail extension/gadget API - how to add a button to the compose toolbar?

心已入冬 提交于 2019-11-27 11:17:17
问题 I'm trying to figure out how can I add a button to the Gmail compose window. In "Gmail Labs" they have some extensions that add certain buttons For example "Send & Archive" button and "Inserting images" button, so I assume this is possible. I checked their API here and it seems that you can either add a gadget to left sidebar or use contextual gadgets that are dependent on the message context. I'm looking for a way to add a button to the toolbar of the compose window, and both options don't

Can a greasemonkey-type userscript be packaged as a Chrome extension?

五迷三道 提交于 2019-11-27 10:52:46
问题 Today Google changed the way userscripts are installed in Chrome. No longer can you just click on a link that contains one, confirm a couple dialog boxes and have it installed. Now you have to download the script with Save As..., open the Finder/Explorer window that contains it, open the Extensions window in Chrome, then drag the script to the extensions window. IOW, a big PITA. Presumably the alternative is to package as a Chrome extension and get it on the Chrome webstore. However, I can't

Where are Chrome/Tampermonkey userscripts stored on the filesystem? [closed]

你说的曾经没有我的故事 提交于 2019-11-27 10:47:59
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 7 years ago . Where are Chrome/Tampermonkey userscripts stored on the filesystem? I want to edit user scripts directly instead of using the hokey in-browser editor. 回答1: Tampermonkey scripts are super easy to update via the Tampermonkey tab. See the Tampermonkey FAQ, or just try it. Tampermonkey scripts were stored in a

Can the mechanism that loads the worker in Shared Web Workers be modified?

丶灬走出姿态 提交于 2019-11-27 09:37:49
Please see this related question for a background to this: How can I load a shared web worker with a user-script? With that question in mind, I want to explore the possibility (in context of a user-script) of modifying the Shared Worker constructor so that the mechanism responsible for loading the web worker is replaced with the GM function GM_xmlhttpRequest , which works like XMLHttpRequest while ignoring same origin policies. To be clear, I'm writing a user script for Stack Overflow to help automate a certain process for myself and others, and I need to communicate between two open SO tabs,