greasemonkey

Replacement background image not showing when using GreaseMonkey

I'm trying to use GreaseMonkey to replace the background image of a DIV on bing.com. It's a pretty straightforward call to GM_addstyle: GM_addStyle(".sw_logo " +"{background:url('http://www.kpao.org/blog/kpao-bing-logo-inverse.png') " +"no-repeat 21px 7px transparent}"); However, the image doesn't show up. It's clearly visible in Fire...

How can you replace a link's target in Greasemonkey?

I'm trying to write a script in Greasemonkey that will replace a link's target with something else, but with my limited Javascript knowledge I don't really know how to do this. Basically I'm trying to find all links containing a certain string of characters (ex: //a[contains(@href, 'xx')] ), and either replace them with another link, o...

Is there a way to disable all other Java Scripts other than my own with Grease Monkey

I need help getting a Grease Monkey with JQuery Script to run on a broken site. I'm trying to get the following GM script to run, but the page I want it to work on has a JS error and my JS does not get executed. // ==UserScript== // @name BILL INFO PAGE ALTER // @namespace http://jenkinslaw.org // @description Alter the ...

Change File ext with GreaseMonkey?

One of the sites i visit has an annoying habit of naming all their files showimage.php. When i save the image or file it saves as a .php so i cannot open the file. The worse part is, there is a &ext=zip&more=blah in the url. Is it possible to use greasemonkey to rename the file ext so it isnt php? (maybe injecting a content disposition ...

Help making userscript work in chrome

I've written a userscript for Gmail : Pimp.my.Gmail & i'd like it to be compatible with Google Chrome too. Now i have tried a couple of things, to the best of my Javascript knowledge (which is very weak) & have been successful up-to a certain extent, though im not sure if it's the right way. Here's what i tried, to make it work in Chro...

Write a GreaseMonkey script that reacts to domain strings (for I18N, e.g. cn,en,fr,etc.)

Hello. Suppose there is a website that supports multiple languages: cn.mydomain.com or mydomain.com/cn or mydomain.cn en.mydomain.com or mydomain.com/en or mydomain.com fr.mydomain.com or mydomain.com/fr or mydomain.fr I want to write a GreaseMonkey script that has variables assigned different strings/values according to the address ...

document.getElementById doesnt work with "input id", how can I do it? [+Greasemonkey]

I have this line on a website <input type="text" autocomplete="off" value="" maxlength="20" class="shipBox" name="firstName" id="firstName"> and I want my greasemonkey to automatically fill this... I'm trying this but had no success document.getElementById("firstName").setAttribute("autocomplete", "on"); document.getElementById("fi...

Using jQuery 1.4 in GreaseMonkey while the original page uses jQuery 1.3 (different version)?

Hi. What is the best strategy to supply a necessary new version of jQuery (1.4.2) in a userscript, which modifies a page that already has an older version of jQuery (1.3.1)? Preferably the original page continues to use '$' sign while in my script it uses an alias assigned by jquery.noConflict(). According to the answer to this questi...

How automatically fill a form with jQuery ?

Hi, I have a website that changes his inputs ids, and I'm trying to make a semi auto-login, filling automatically the email and the password part... I'm doing this with greasemonkey and jQuery... I'm trying something like this $("input[@type=text]").setValue("[email protected]"); but had no success... The Page has only the login par...

Can Firefox Plugin, Greasmonkey, be detected by Web Servers?

Hi, My friend's account for some Facebook game was suspended on the grounds that he had Greasemonkey installed on his browser. He is asked to uninstall Greasemonkey and account has been restored. My question is how can a web server detect a client side plugin presence? I assume that Greasemonkey or greasemonkey scripts operate on the ...

calling Greasemonkey functions from web page

Hi Can I call function() of my custom Greasemonkey from my page? For example, I created a GM script that contains do_this() function. I want my-web-site.com call the do_this() function. But I can't. I know, I can by doing unsafeWindow.do_this() but doing so prevents me from calling GM_xmlhttpRequest(). Any ideas? ...

Greasemonkey Error: Component returned failure code: 0x80004005

Hi This error triggers only sometimes when I do XMLHTTPRequest. uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIXMLHttpRequest.setRequestHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: file:///C:/Documents%20and%20Settings/tmp2/Application%20Data/Mozilla/Fi...

Greasemonkey failing to GM_setValue()

I have a Greasemonkey script that uses a Javascript object to maintain some stored objects. It covers quite a large volume of information, but substantially less than it successfully stored and retrieved prior to encountering my problem. One value refuses to save, and I can not for the life of me determine why. The following problem c...

How can I catch all ajax requests in javascript ?

Is it possible to have a global event handler for ajax requests that automatically gets called when any ajax request returns ? I'm interested in this because I'm making a greasemonkey script for an ajax site. In previous scripts I either ran the main function every few seconds or overwrote parts of the site's javascript, both things tha...

How to split a loaded picture using greasemonkey?

I'm using FireFox. I want to split a picture into 3 parts and then display only middle part using greasemonkey. Can someone please help me out... Thank You ...

Handle window scroll event in greasemonkey script

Hi. I need some advice. I have a web page and want to extend it's functionality with greasemonkey script and firefox. When page has loaded I need run custom function during user's page scrolling (with mouse whell or scrollbar). I want show some div block when user scrolling down and hide it when he scrolling to the top. But I met som...

Changing CSS before pageload with Greasemonkey

I need to hide an element on the page using greasemonkey before it loads (so that it's never visible). At the moment I'm @requireing jQuery 1.3.2 which I'm reasonably familiar with, but I'm unsure how it interacts with greasemonkey so I don't know how to pull this off! Many thanks, JP ...

Running custom Javascript on every page in Mozilla Firefox

I have a custom piece of Javascript which I would like to run on every web page from specific domains, or perhaps simply on every web page. (If you are wondering: it is not malicious. It allows to display formulas by using MathJax.) Is that possible? I tried including it in userContent.css, that of course did not work. A simple Grea...

Is there a way to write a greasemonkey script to register hotkeys?

I'm using a Wiki application that has buttons to indent and outdent list items. I'd like to write a greasemonkey script to capture Ctrl+M and Ctrl+Shift+M for indent and outdent, respectively. Is this possible? ...

Ignore document style rules in one element.

I write a greasemonkey script that adds sticky notes to websites. Because there sometimes are pretty strange style rules used in some websites the sticky notes sometimes turn up messed up (or at least not looking like I want them to look). Is there a way to say "under this element do not apply any generic stylerules"? So that rules asso...