greasemonkey

Can I save page pictures directly from GreaseMonkey script

Can I save page pictures from GreaseMonkey script directly to my hard drive? Is the easiest way to do it - to setup my server and translate picture urls to it using GM_xmlhttpRequest ? ...

JavaScript/Greasemonkey: Avoiding FireFox Security Warning when Submitting a Form from a Secure Page

Hi, I'm writing a Greasemonkey script to connect two company-internal webpages. One is SSL, and the other is insecure and can only be accessed via a POST request. If I create a hidden form on the secure page and submit it via an onclick() in an <a>, it works fine, but FF gives a warning: Although this page is encrypted, the infor...

A little help with DOM manip and GreaseMonkey

I'm not a JS guy so I'm kinda stumbling around in the dark. Basically, I wanted something that would add a link to a twitter search for @replies to a particular user while on that person's page. Two things I am trying to figure out: how to extract the user name from the page so that I can construct the right URL. ie. if I am on http:...

Image Manipulation with Javascript?

I'm trying to write a greasemonkey script, and it would be preferable for it to be able to work with images (specifically, find the darkest pixel in an image). Is there a way to do this or must I embed flash? ...

Client-Side script to read and manipulate image from the web (details...)

I want to be able to use a Greasemonkey script that can take an image from a page, scan it for the darkest pixel, and then return those coordinates to the browser. Originally, I used a flash script... Greasemonkey embedded a local flash file that would fetch the image based on a URL in the source of the webpage, use ActionScript to get ...

Load an image from Firefox cache?

Hi, I'm trying to load an image from the Firefox cache as the title suggests. I'm running Ubuntu, so the location of my cache is /home/me/.mozilla/firefox/xxxxxx.default/Cache However, in the Cache (and this is on Mac, too) the filenames are just ridiculous combinations of letters and numbers. Is there a way to pinpoint a certain file? ...

Greasemonkey namespace..what is it for?

I'm learning how to use greasemonkey and was wondering what the @namespace metadata part is used for. Does it have to be a web address or can it be a folder/directory on my computer? Does it even need to be filled in or can I just ignore it? Thanks for the help :) ...

Removing images with Greasemonkey?

I would like to stop images from loading, as in not even get a chance to download, using greasemonkey. Right now I have var images = document.getElementsByTagName('img'); for (var i=0; i<images.length; i++){ images[i].src = ""; } but I don't think this actually stops the images from downloading. Anyone know how to stop the ima...

JavaScript (via Greasemonkey) failing to set "title" attributes on <a> tags

I have the following (fairly) simple JavaScript snippet that I have wired into Greasemonkey. It goes through a page, looks for <a> tags whose href points to tinyurl.com, and adds a "title" attribute that identifies the true destination of the link. Much of the important code comes from an older (unsupported) Greasemonkey script that quit...

Lazyweb: Need javascript that removes li elements based on visited class of a element

Hello, I've got this page which has a lot of data I don't need, as I've already clicked on it, but it repeats often so I have to visually look for blue. I realized this could be more efficient, and asked a CSS friend if I could set the element to hidden based on whether or not the containing link has been visited. Apparently you need ...

Should jquery.data() work in Greasemonkey scripts?

I'm using jquery in a greasemonkey user script. I'm trying to add a bunch of options to a select based on an array and also stick the corresponding object in the element with jquery.data like this: $.each(some_array, function(item){ // These next 2 statements seem awkward to me and I was also hoping // a jquery master could show me...

How to embed additional jQuery plugins into Greasemonkey

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 ...

Greasemonkey: Text processing - What's the best way to find certain words in a website and have a function work on it?

I want greasemonkey to scan through a website and change certain words to something else. Is there a way to do it with regex or some other string processing function in javascript? Thanks for your help :) ...

How can I get greasemonkey to call a function on a page after it loads

I have a very simple greasemonkey script that I want to call an already existing javascript function on the page. I've read the documentation and nothing seems to work window.setTimeout(function() { alert('test') // This alert works, but nothing after it does myFunction() // undefined window.myFunction() // undefined do...

Greasemonkey: Change text in a webpage?

I used the function: document.getElementsByTagName('strong') to get all the text in a page with that type of formatting. The HTML looks like: <td align="center" valign="bottom"><H1><font size="+4"><strong>TEXT_HERE</strong></font> <br> I would like to change "TEXT_HERE" to maybe something else or remove it all together. How might...

Greasemonkey: XPath returns no results for .xhtml page

When running on an xhtml page, xpath doesn't seem to return any results. var result = document.evaluate( "//a/img", document.body, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null ); For example returns an empty result set. What's the problem here, and how do I fix it? ...

Overriding !important style using Javascript

Title pretty much sums it up. The external style sheet has the following code: td.EvenRow a{ display: none !important; } I have tried using: element.style.display = "inline"; and element.style.display = "inline !important"; but neither works. Is it possible to override an !important style using javascript. This is for a grea...

Best way to store data for Greasemonkey based crawler?

I want to crawl a site with Greasemonkey and wonder if there is a better way to temporarily store values than with GM_setValue. What I want to do is crawl my contacts in a social network and extract the Twitter URLs from their profile pages. My current plan is to open each profile in it's own tab, so that it looks more like a normal br...

java/greasemonkey, how can i take an image and find the darkest pixel then click it?

yeah i need to use a grease monkey script to find the darkest pixel in an image and then click the point it finds. im kinda a noob programmer so any help would be awesome, thanks! ...

How to get a GreaseMonkey script to listen for elements with a specific class being inserted into a page

I'd like my GreaseMonkey script to run a function whenever elements with a specific class are inserted into a page. What's the most idiomatic way of doing that? If it helps, it's a <select> element that is being inserted. ...