greasemonkey

DOM - More than 5 'window' objects on one page

Hi, I'm trying to extract data from one of my websites using Greasemonkey. Problem is, the script runs 6 times because apparently the page loads content from 6 different servers. So if I put in an alert ("Hey"); the code runs 6 times and I get 6 alerts. How can I wait for the entire page to load and then start playing with the DOM. A...

Greasemonkey - jQuery not loading

Hi, I tried to load a copy of jQuery 1.3.2 from jquery.com (because it seems 1.4.0+ aren't treated too well by GM) using @require. Even after I uninstall and reinstall the script, GM does not copy jquery-1.3.2.js to my gm_scripts folder like it should. Tried this almost 10 times today. Also, when I click on "Manage Scripts", it shows...

Why is $ undefined when I try to use jQuery in GreaseMonkey?

I'm totally new to GreaseMonkey, but I'm trying to make a little script. // ==UserScript== // @require http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js // ==/UserScript== (function() { $ = unsafeWindow.jQuery; alert($); // this gives 'undefined' }()); Why does the alert give undefined and how to fix this? UPD...

Compile greasemonkey script into xpi to save file???

if i compile a greasemonkey script into an xpi, then can that xpi access to local file to read and write files from hard disk??? question 2, if i save data using SetValue API of GM then do i need to del the value or does it gets deleted automatically when i restart the FireFox browser?? ...

GreaseMonkey + Ajax + Remember page?

I load jquery into my greasemonkey script and when the user clicks the start button the script makes a bunch of ajax calls. I then empty body and append data. When i click on something and hit back instead of getting the page post script i lose all the data and need to run the ajax calls again (it can take seconds to run). How do i make ...

getElementsByClassName not working on parsed html data in greasemonkey

Hi my code is as such var xhReq = new XMLHttpRequest(); xhReq.open("GET", linksRaw, false); xhReq.send(null); var serverResponse = xhReq.responseText; var tempDiv = document.createElement('div'); tempDiv.innerHTML = serverResponse.replace(/<script(.|\s)*?\/script>/g, ''); var plzWork = tempDiv.getElementsByClassName('organizationID').in...

How to I access a page level (local) javascript variable in a greasemonkey script?

I just want my GM script to do a window.alert(foo) where foo is equal to a local javascript variable within the page. Ideas? ...

Is there any addon that can make javascript execute before the page loads??

Well, greasemonkey can execute users script but only after the page loads fully. Is there any script that can take user script (javascript) and executes it before the page downlaods any elemts. for instance, As soon as the HTML file is downloaded, the user script should execute so that i can prevents the download of embedded elements lik...

Click in a image/function with javascript on Greasemonkey ?

How can I click in a image/function with javascript? Something like: document.getElementById("check-in-banner").click(); the source of the part is <a id="check-in-button" href="#"> Thank you very much ...

Storing data when using Greasemonkey

Is there a good way to store an extensive ammount of data when using Greasemonkey for when GM_setValue just doesn't cut it? ...

Is there a version of GreaseMonkey that prints ALL errors to the console, like if the UserScript was a real JavaScript?

Is there a version of GreaseMonkey that prints ALL errors to the console, like if the UserScript was a real JavaScript? For example syntax errors? ...

turning on Greasemonkey live editing

On Firefox, I click Tools, Addons, Extensions, Greasemonkey, Options, select my user script, click Edit, change the source code, click save, reload one of the included pages, but the script is the unchanged version. On User Scripts, logged in, I click my username, Script Management, my script's name, Admin, Edit Code Online, change the ...

a simple regexp

The regexp has to remove ,id or id, in read and unread. GM_setValue('unreadids', unreadids.replace(new RegExp('('+id+',)|(,'+id+')', 'i'),'')); GM_setValue('readids', readids.replace(new RegExp('('+id+',)|(,'+id+')', 'i'), '')); In RX Toolkit, (,1|1,) for a test, ,1 or ,1 is replaced with nothing. In real life... http://userscripts....

JQuery/Greasemonkey in Google Chrome. Why won't this work? No Alert shows up.

I'm unable to get this script to work as an extension in google chrome. No alert shows up. normal javascript alerts work. // ==UserScript== // @name voip // @namespace 1 // @description voip // @include * // @require http://jquery.com/src/jquery-latest.js // ==/UserScript== $(document).ready(function() {...

How can I run a user script before any inline scripts run on a webpage?

I want to make a greasemonkey type script for firefox that runs before the scripts on the page. Greasemonkey scripts run after scripts on the page, so that won't work. The reason I need this is because I want to edit one of the scripts on the page. Specifically, I want to delete a script that forces the page to load inside a frame sin...

Dynamically loaded jQuery with GreaseMonkey inconsistent on pages (refreshing seems to fix it)... don't know why

Hi, I want a custom page analysis footer on every site I visit... so I've used a method to attach JQuery to unsafeWindow. I then create a floating footer on the page. I want to be able to call commands in a menu, do some processing, then put the results in the footer. Unfortunately it sometimes works, sometimes it doesn't. At least t...

Greasemonkey Submit Form

I'm trying to autosubmit a form with greasemonkey however I'm not sure how to do it with this button. The button seems to have the following properties a class="blue-button" href="javascript:void(0)" onclick="Form.submit(this);" and the only form I see above is <form xmlns="http://www.w3.org/1999/xhtml" xmlns:s="http://www.blizzard....

Write an add-on or greasemonkey script to "Ajaxify" webpages in Firefox?

Hello. I stumbled upon this add-on which "Ajaxifies" parts of its target website. https://addons.mozilla.org/en-US/firefox/addon/51789 I have a similar need like this. I want only part of the webpage's DOM to update upon receiving click on a link, since the website has a rather unified page layout. I have no experiences in writing FF...

greasemonkey: perform GM_xmlhttpRequest() from eval (follow up)

How can you call GM_xmlhttpRequest inside of an eval where you are evaling some complicated code, some of which calls GM_xmlhttpRequest. This is a follow up to http://stackoverflow.com/questions/1074236 Here is some sample code: // ==UserScript== // @name Test GM AJAX // ==/UserScript== console = unsafeWindow.console; functi...

How to distinguish a link whether it will trigger file downloading or jumping into anywhere else , such as a new URL

Hi, I get a idea writing a greasemonkey user javascript that can detect which is the exactly real download link rather than an advertisement link or something else . Actually, I find that some real download link is linked to .php . It's tough to detect it I think. how could I do that, any ideas? ...