greasemonkey

Why isn't my Greasemonkey script updating?

眉间皱痕 提交于 2019-11-29 11:14:53
问题 I've got a Greasemonkey script for Firefox. The script includes this meta-block and some lines of code. I want to update my script on the server and then automatically update the browser's scripts. The requireSecureUpdates option is off. What am I doing wrong? My 1.meta.js // ==UserScript== // @name Ibood autosubmit // @include https://*.ibood.com/* // @include http://*.ibood.com/* // @include * // @version 1.1 // @require http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js //

Greasemonkey script only runs when page is reloaded

蓝咒 提交于 2019-11-29 10:46:35
I am working on a Greasemonkey script to turn some text into links on a a Rally page. The script works fine only when I reload the page. If I navigate to the page in any manner (links, browser forward/back) the script does not run, despite the fact that the Greasemonkey menu shows my script at the bottom, with a checkmark. Here is an example URL: https://rally1.rallydev.com/#/4745909548/detail/userstory/6138899084/changesets My matching rule: /^https://.*\.rallydev\.com/.*/changesets$/ I don't know if the hash is causing a problem, but everything is fine when I reload. Not sure where to go

Get if browser is busy

。_饼干妹妹 提交于 2019-11-29 07:42:02
I'm trying to find a way to get if the browser is currently busy from JavaScript. I'm looking at making a Firefox extension to inject a Boolean value or something if the current page is loading something (either through ajax or just normal page loads), or the same with a Greasemonkey script, or through some JavaScript API (this would be the best solution, but from what I can see, nothing of the sort exists). I was wondering what the best way to do this would be. I've been looking for Firefox Addon / Greasemonkey tutorials for making something like this and can't find anything. Does anyone have

Find and replace in a webpage using javascript [duplicate]

℡╲_俬逩灬. 提交于 2019-11-29 07:25:30
This question already has an answer here: Replace many text terms, using Tampermonkey, without affecting URLs and not looking for classes or ids 1 answer What I want to do is replace all instances of 'foo' in a webpage with 'bar' in a JS bookmarklet/greasemonkey script. How can I do this? I suppose jQuery works, as there're hacks to include those in both bookmarklets and greasemonkey scripts. Josh Stodola This script iterates through each element in the document and replaces every instance of foo with bar . The gi modifiers on the regex make it do a global , case-insensitive search. var els =

Can Greasemonkey fetch values from a paginated sequence of URL's?

一世执手 提交于 2019-11-29 05:09:48
I would like to fetch a value from https://play.google.com/store/account* , which makes the user page through its output. For example: /store/account?start=0&num=40 , then /store/account?start=40&num=40 , etc. Now, when I visit https://play.google.com/apps , I'd like Greasemonkey to tot-up the values from the /store/account pages and then display the final value on that page. The code listed below can total the value, that I want, from the /store/account pages. However, I want to insert the code in a script that's used for the second URL, so I can prepend it on that same page. // ==UserScript=

How can I make a Greasemonkey script to auto-download a file? [duplicate]

荒凉一梦 提交于 2019-11-29 04:52:26
This question already has an answer here: Save images to hard disk WITHOUT prompt? 6 answers I go to the page, it has 1 zip file, but I don't know the name, other than its a .zip . I want Greasemonkey to download this zip automatically, maybe using flashgot or something? So I need it to activate on page load, then look for *.zip , and add that to downloads automatically. Any ideas? Brock Adams Greasemonkey, by itself, cannot automatically save zip-files, or anything else, to the local file system. This is by design; allowing user/page JavaScript to save files is a proven security disaster.

How to embed additional jQuery plugins into Greasemonkey

≡放荡痞女 提交于 2019-11-29 04:01:01
问题 So I've been able to get Greasemonkey and jQuery 1.2.6 to work together without issue, but, now I'm wondering how to embed additional jQuery plugins into my Greasemonkey script, such as Eric Martin's SimpleModal plugin (http://www.ericmmartin.com/projects/simplemodal/). The following code gets jQuery loaded, but I'm not sure how to get SimpleModal loaded properly: var GM_JQ = document.createElement('script'); GM_JQ.src = 'http://jqueryjs.googlecode.com/files/jquery-1.2.6.min.js'; GM_JQ.type =

Greasemonkey @require jQuery not working “Component not available”

最后都变了- 提交于 2019-11-29 03:57:42
I've seen the other question on here about loading jQuery in a Greasemonkey. Having tried that method, with this require statement inside my ==UserScript== tags: // @require http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js I still get the following error message in Firefox's error console: Error: Component is not available Source File: file:///Users/greg/Library/Application%20Support/ Firefox/Profiles/xo9xhovo.default/gm_scripts/myscript/jquerymin.js Line: 36 This stops my greasemonkey code from running. I've made sure I included the @require for jQuery and saved my js file before

Adding jQuery UI to Greasemonkey script fails with external CSS file

时间秒杀一切 提交于 2019-11-29 02:31:54
问题 I'm trying to add jquery-ui to a Greasemonkey script. my full code: test.user.js : // ==UserScript== // @name Test // @namespace rajat.khandelwal // @description Test script // @include * // @require js/jquery-1.6.2.min.js // @require js/jquery-ui-1.8.16.custom.min.js // @require css/ui-darkness/jquery-ui-1.8.16.custom.css // ==/UserScript== alert('hi'); and In current directory I added JS and CSS directory. It throws error saying syntax error in css Error: syntax error Source File: file:///C

How to Run a Greasemonkey Script only once

僤鯓⒐⒋嵵緔 提交于 2019-11-29 02:30:10
I made a greasemonkey script for a domain, Now how do I make it run only once? Like it starts every time the domain is accessed, I don't want that. How do I make it run only once and then like delete itself or make itself inactive? Thanks. Brock Adams If you want a script (or part of a script) to run only once, then you need to store a flag in non-volatile storage. A script cannot delete itself or turn itself off. But it can exit right away rather than run any other code. To store things on a site-by-site (domain) basis, use localStorage . To store things on a script+namespace basis, use GM