greasemonkey

Greasemonkey @require jQuery not working "Component not available"

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

Problems using HTML Canvas & Greasemonkey not able to drawImage() on 2D context

In my Greasemonkey script, when I obtain a handle on an HTMLImageElement I want to use with an HTML Canvas, I get the following error in Firefox's Error Console (I assume it's because it's enclosed in an XPCNativeWrapper): Error: Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIDOMCanvasRenderingContext2D...

Is there a greasemonkey for IE? or, how do I get a website to use MSXML6 instead of MSXML5 ?

I don't know greasemonkey but I think it is a way to script or extend Firefox. Is there a greasemonkey for IE? for example: There's a website that is hosting a page that asks me to install MSXML5.0. I don't want MSXML5.0. I was thinking if I had a greasemonkey capability (if it is what I think it is), I'd be able to write a scr...

GM_xmlhttpRequest - triggers on Parent and Iframe windows - should only trigger on Parent window

I am building a GreaseMonkey test script that makes a GM_xmlhttpRequest each time a specific site is visited. GM_xmlhttpRequest should only trigger on the first "document" found (the parent window) and it should ignore iframes and other child windows (I don't want the url for the iframes). Some thoughts and possible solutions: 1) I tri...

How to get a serialized array from a client form to a server using the GM_xmlhttpRequest

I used JQuery.serializeArray() on a form to create an array of objects on a GreaseMonkey application: [ { name: a value: 1 }, { name: b value: 2 }, { name: c value: 3 }, { name: d value: 4 }, { name: e value: 5 } ] I need to use GM_xmlhttpRequest to serve these fields back to...

Greasemonkey Javascript Key Press Help

So I'm currently trying to make a GreaseMonkey script that will allow a user to press left or right on their keyboard and have that go to a previous comic strip or go to the next strip. I currently have some code up but it's not giving me any results. function KeyCheck() { var KeyID = event.keyCode; alert(KeyID); } document.onKeyDown =...

Can greasemonkey delete cookies from a given domain?

Can greasemonkey delete cookies from a given domain? If so, how? ...

How do I use jQuery in my Greasemonkey Javascript scripts?

I saw a question here and many blog posts about getting jquery into greasemonkey, but I can't get anything to work. Here's my script: // ==UserScript== // @name Hello jQuery // @namespace http://foo.bar // @description jQuery test script // @include * // ==/UserScript== #{contents of jquery.latest.js pasted in} ...

Load and parse remote url with greasemonkey

How can I write a Greasemonkey script that will go through a list of URLs (on the same domain) and enable an XPath query to be performed on the resulting DOM? Thanks ...

How can I enhance the functionality of a page whose source I shouldn't modify?

A friend of mine uses a web-app for work related purposes. The app's built using PHP/MySQL , and while it has some JavaScript to make it easier to work with, it's not user friendly enough, and with a bit of extra JS, a lot of stuff could be automated. I would like to enhance that app, but I'd like to not have to modify the original ser...

Greasemonkey: load url using GM_xmlhttpRequest and createContextualFragment

I have the following GreaseMonkey Script: GM_xmlhttpRequest({ method: 'GET', url: "http://www.testurl.com", headers: { 'User-agent': 'Mozilla/4.0 (compatible) Greasemonkey/0.3', }, onload: function(responseDetails) { var tagString = responseDetails.responseText; var range = document.create...

Include Jquery inside GreaseMonkey script under Google Chrome

As maybe some of you know google chrome has put some severe limitation on greasemonkey scripts. Chromium does not support @require, @resource, unsafeWindow, GM_registerMenuCommand, GM_setValue, or GM_getValue. And without require, I can't find a way to include jquery library in Greasemonkey script under google chrome. Does anybod...

What's an effective way to move data from one open browser tab to another?

I am looking for a quick way to grab some data off of one Web page and throw it into another. I don't have access to the query string in the URL of the second page, so passing the data that way is not an option. Right now, I am using a Greasemonkey user script in tandem with a JS bookmarklet trigger: javascript:doIt(); // ==UserScript==...

Greasemonkey, delete <a> element

I have this Greasemonkey script, I originally wanted to get all the <table> elements and search through those for but I couldn't get that to work. So I tried searching for the <a> elements themselves and just hiding them if they contained "http://www.4chanscapepk.t35.com" but its not working either. What am I missing? var results = d...

Replace javascript on a site with Greasemonkey

Hello, does anyone know how to replace JavaScript on a site with Greasemonkey ie. This is the default code: var Test="1"; And i want to replace it like this on the page load: var Test="2"; Thanks in advance! ...

greasemonkey, jquery and setTimeout

Hi, I'm playing around with jquery and greasemonkey and tried to use setTimeout to call a function every second, but for some reason it doesn't work. // Add jQuery var GM_JQ = document.createElement('script'); GM_JQ.src = 'http://jquery.com/src/jquery-latest.js'; GM_JQ.type = 'text/javascript'; document.getElementsByTagName('head')[0].a...

Injecting JS functions into the page from a Greasemonkey script on Chrome

I have a Greasemonkey script that works just fine in Firefox and Opera. I struggle with getting it to work in Chrome, however. The problem is injecting a function into the page that can be invoked by code from the page. Here's what I'm doing so far: First, I get a helper reference to the unsafeWindow for Firefox. This allows me to have ...

Can I use Google Analytics to track usage of a Greasemonkey script?

I've got a greasemonkey script and I'd like to get an idea of how many regular users I have, what I'd really like is to use Google analytics inside the script. But I'm not sure how to do it if it's even posible. Also, the site the GM script is running on also has Analytics so would this clash prevent me from doing it? ...

Greasemonkey script injection

Hi, I'm using greasemonkey to inject a script into every page that loads in my browser. The problem that i'm facing now is that, if the browser moves from one page to another within the same domain, greasemonkey doesn't inject my script again. For example, I'm at google.com, so when my browser loads this page, my script is injected. Now,...

Using jquery and greasemonkey to get multiple pages

Sorry the title isn't great, it's sort of a loaded question.. What I am trying to do is load multiple pages from links on a page (they are on the same host). In my case it is a forum in the thread view, and I'd like to load the last page of posts so there's some kind of preview. To keep it simple, my code example assumes jquery is alrea...