How to debug the Greasemonkey script on Firefox 30?

I've been developing a JavaScript snippet for Youtube which uses Greasemonkey, and also imports Bootstrap and jQuery libraries. This application has to add a button for each one of the search list results and when the user clicks it, it must bring th

how to enter a random value in a textarea without an id?

I have to enter a random value in a textarea of a web site by using grease monkey script the text area didn't have an id so document.getElementById doesn't work. Can I use another method to do that? My current HTML showing my textarea: <tr> <td c

How do I know from the client side if a postback has occurred?

I am developing a Greasemonkey script and this script changes some elements in a table. However, when we click a button in the table an asynchronous postback happens and the table is refreshed. So, my elements are also refreshed. How do I know a post

Add a moveable window to a page using Greasemonkey

I'm trying to create a Greasemonkey script that adds a draggable div to every web page. For some reason, the div isn't displaying at all. What might be the reason for this? // ==UserScript== // @name Draggable box demo // @namespace http://use.i.E.yo

How to simulate a real onchange for an element?

I have a select element that has its onchange event handled by a jQuery event listener, and its onchange attribute is empty. Triggering the onchange event by this method document.getElementById("element_name").onchange(); is not working. I want

Open a new tab with custom HTML instead of a URL

I'm making a Greasemonkey script and would like to open a new tab which will not display a URL but some HTML that is part of the script. So basically I want to do something like this (which is obviously not working): window.open('<html><head>&

Deleting child nodes from a div node

I have following codes to remove child nodes of a div node. Are both of these codes correct? while(innerWindowContentBox.hasChildNodes()) innerWindowContentBox.removeChild(innerWindowContentBox.childNodes[0]); Other is innerWindowContentBox.innerHTML

Jquery loop through the regex match

(This is greasemonkey with jquery) I have a string of data which is retrieved with $.post('page.php',function (data) { ... }); In that data, there are html tags like <option value='numeric'>data</option> along with random, useless information.

What is & & dquo; this & rdquo; pointer for global functions?

Possible Duplicates: 'this' keyword, not clear this operator in javascript function foo() { if(this === window) return null; return 1; } var i = foo(); // returns 1; What is the this member of a global function, and how can I test from within a funct

Using CR only as linebreak in the pre-tag does not work

At work, we stumbled upon Bugzilla creating HTML output that led to lines much too long because the browser didn't break the lines. This was happening on Chrome, but not on Firefox 3.5, so we didn't really care. But Firefox 4 behaves just like Chrome

Xpath expression for numeric comparison

I'm writing a Greasemonkey script so can't change the source XHTML. Given the following XHTML fragment: <td> <span class="entry">Gender, Age:</span> Female, 42<br> <span class="entry">Country, Town:</sp

How can I redirect a page with javascript in Greasemonkey?

Hey, I want to redirect a page when it finish loading... For example, when google.com finish loading, I want to send a javascript to search something... How can I do it ?This is simply how I would go about redirecting: //==UserScript== // @name Redir

xpath - limit search to node does not work?

What am I doing wrong here? I am trying to limit my xpath search to a specific row in my table but my query always returns the content of the span in the first row: var query = "//span[contains(@id, 'timer')]"; var root = document.getElementById

Greasemonkey Javascript Press the Help key

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

What can a GreaseMonkey script do to crash Firefox?

I have a relatively large script in GreaseMonkey and it seems to be crashing the browser after some time. It looks like it does its thing and then after a while Firefox just dies. Seems to me that this has to be connected with to my script. The page

Get the subdomain and load it in url with greasemonkey

I am having the URL http://somesubdomain.domain.com (subdomains may vary, domain is always the same). Need to take subdomain and reload the page with something like domain.com/some/path/here/somesubdomain using greasemonkey (or open a new window with

Greasemonkey Script and Function Scope

Here is my script code: // ==UserScript== // @name test // @description test // @include http://* // @copyright Bruno Tyndall // ==/UserScript== var main = function() { var b = document.getElementsByTagName('body')[0]; var t = document.createElement(

Overriding! Important style

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

Greasemonkey: Change the text of a web page?

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