greasemonkey

Using special keys for keybidings in Javascript

I was wondering if it was possible to use special keys that the macbook pro has for music control and bind them in javascript? Example keys: PLay/pause,next, back. I am trying to do this to modify a greasemonkey script if that helps. Here is the current code HotKeys.bindings['/'] = HotKeys.activateSearch; HotKeys.bindings['p'] = HotK...

Save File using Greasemonkey

I have some screen scraped tabular data that I want to export to a CSV file (currently I am just placing it in the clipboard), is there anyway to do this in Greasemonkey? Any suggestions on where to look for a sample or some documentation on this kind of functionality? Just to be clear, I don't want to write to the local file system (...

javascript (greasemonkey) how to access a newly created iframe

hi there, i have this website, by clicking on certain link on the website an iframe will be created within the same window. my question, just wondering how to access this iframe? i tried document.getElementById() return null tried window.frames not there Thanks ...

Calling a greasemonkey function on a user clicking a button

I have written a script that adds an additional column and a link in each row. The problem is I wan the links to call a function in my greasemonkey script and pass a variable to it. I have read that due to the nature of greasemonkey being in a sandbox its not possible without a function called 'unsafeWindow'. I can't for the life of me ...

Undefined variable error when parsing json

I'm trying to parse the json grabbed from here. Basically what I do is iterate over the items, sort them, then display them. But I get an error saying data.data.children[i] is undefined. I can't think why it's doing it though? var json = 'http://www.reddit.com/reddits/mine/.json'; GM_xmlhttpRequest({ method: "GET", url: jso...

need small javascript for greasemonkey

HI, i need a greasemonkey code for a web page. The page has hidden input type and value. I need a gm script which can alert the value of the hidden input object as soon as the page loads. The input tag is present in a form with: form id="bloog" method="post" action= "/newpage.php" name="bloog"> The hidden content is present as: <in...

greasemonkey code modification

Hi,all.. A user has helped me find hidden values in a page and display it using alert. If there are radio buttons and one of them is related to this value,is there a way to select the radio button automatically rathar than displaying the value in alert box.. Thanks... the code is as follows: var inputs = document.getElementsByTagName(...

AJAX post to simulate Input type="file" path

Hi, I would like to know if its possible to make an AJAX post request to submit a file path to a form. Basically, I want to know if its possible to simulate the path a normal input type="file" would create, but in an AJAX request. Also, is it possible for that link to be pointing to a file on another website? I think I have no other cho...

alert a variable value

How do I display the value of a variable in javascript in an alert box? For example I've got a variable x=100 and alert(x) isn't working. the script used in grease monkey is here var inputs = document.getElementsByTagName('input'); var new; for (i=0; i<inputs.length; i++) { if (inputs[i].getAttribute("name") == "ans") { new=inpu...

greasemonkey script to select radio button

Hi all, i'm new here. i've a question related to greasemonkey. A page contain multiple radio buttoned values and one choice is to made, this correct choice option is hidden within the page the radio buttons are present in the form whose structure is <form name="bloogs" action="/myaddres.php" id="bloogs" method="post" > then the ...

Passing cookies with jquery ajax request from a different domain

I'm building a greasemonkey script to make posting to craigslist a lot easier for our clients. Basically the flow is this: User logs into our system (established authentication cookies with asp.net) User navigates to a section on our site called "CraigsList". If they have the greasemonkey script installed it automatically opens up c...

How do i fix this JS scope in GM_xmlhttpRequest

When i run this code alert 2 shows 6 different href links. alert 3 shows the last href 6 times. How do i make it use the same object (linkdom aka thelink) as alert 2. NOTE: This is in a greasemonkey script { var linkdom = thelink; alert('2' + linkdom.getAttribute("href")); GM_xmlhttpRequest({ met...

JSONP callback method is not defined

I'm trying to get a jsonp callback working using jquery within a greasemonkey script. Here's my jquery: $.ajax({ url: "http://mydomain.com/MyWebService?callback=?", data: { authkey: "temphash" }, type: "get", dataType: "json", cache: false, success: function(data) { console.log(data); } }); in my we...

Pass a variable to new page

I am trying to pass a variable from one page, load another and enter that information. something Like this: When 127.0.0.1/test.html&ID=1234 location.href = "127.0.0.1/newpage.html" if (location.href == newpage.html){ var e = document.GetElementById("Loginbx"); e.Value = ID } I don't have access to modify 127.0.0.1/test.html...

jQuery Select Array in a Selector

So I'm working on a Greasemonkey UserScript for Clients From Hell http://clientsfromhell.net/ and I'm stuck on something. The script allows a user to navigate through posts on the page using the J and K keys. I'm trying to mimic the site http://9gag.com/ navigation. There are 10 posts on the page and each of them have the class post so ...

How can I see included JavaScript sources?

I am trying to script a web page using GreaseMonkey. (I am using Firebug for help in development.) The page has a small amount of JavaScript code, but that code pulls in other JS files from the site. Are the entire collection of JS files stored somewhere on the client side (i.e. on the filesystem somewhere) so that I can view them? O...

Any working Greasemonkey script with Jquery that works in Google Chrome?

Do you have any link\example of Greasemonkey script with Jquery that works in Google Chrome? ...

It's there a way to reload a greasemonkey script ?

It's there a way to reload a script from greasemonkey ? For example: When I enter on some specific website, the script from the greasemonkey works correctly, but when I change the page (asp in the website I guess), the script doesn't reload to take effect... How can I solve it? ...

click a button automatically using greasemonkey

Hi all, There is a button in the web page as <input class="button" type="submit" value="new"> I need a greasemonkey script which even before the page completely loads must automatically click on the button and move to next page. Thanks. ...

Starting User script in Greasemonkey

Is it possible to run a user script before the page and DOM loads? ...