would like to know a tool that could give me a clue on where is the error in a greasemonkey script that i'm working on. I'm using notepad, what tool could "run" the script and tell me where is the error?
Can anyone tell me: 1) why my string appears twice; 2) how to make it appear just once?
I'm trying to insert code at the top of every viewed page. Obviously, document.body appends the string to the closing body tag which is not what I want. What could I use to insert my code as the first childnode under 'body'?
I'm trying to write a script (my first) that loops through some table rows and gets some data from another page using gm_xmlhttprequests. It works if I keep the loop to one, but if I try and loop through all the rows, and therefore have say 10-20 gm_xmlhttprequests, the script just seems to fail. But if I put an alert inside each gm_xmlhttprequest, and wait a bit before dismissing the alert, the gm_xmlhttprequest will succeed and the data gets updated as planned. It seems as if the gm_xmlhttprequests don't block, or the script keeps executing without waiting for the requests to finish. I don't have any listeners on the script, I just want it all to load when the page loads. Also, I looked at the javascript console and it doesn't have any errors about the gm_xmlhttprequests.
I am trying to learn some javascript at the moment and thought a simple greasemonkey script might be a good way to start.What I want the script to do is to replace an existing url on a website with a different url from another location within the website.
E.G. replace "/mailbox.php?inbox" with "/account.php?action=mybookmarks"
There are a lot of examples of replacing existing urls with different ones on the web but they all use id's to locate and replace urls.
This script is for a site I visit often and since I dont own it I dont have the ability to add id tags to the appropriate a tags, this makes writing this script a lot more difficult.This is the code I have so far;
What I would like to do is watch a countdown timer on a page, like the ones on swoopo.co.uk and then perfom an action depending on what time is left on the timer.
I've installed DOM inspector on Firefox and poked around with javascript shell and I think I've figured out how to read the timer and assign that to a variable, something like this -
var timer=document.getElementById('counter_index_page_162980').innerHTML;
Now I need to watch that so I guessed this would do -
while (timer!=="00:00:01") { var timer=document.getElementById('counter_index_page_162980').innerHTML; } alert('timer at 1 sec!');
But that just brings up an "unresponsive script" error in my browser.
Am I even close to the mark? I know I'm not going to win any auctions with this but I've already paid for the bids so I may as well use them now.
I'm a newbie to JavaScript and Greasemonkey and just started learning with 'Dive Into Greasemonkey'. I looked for an example on the web, but unfortunately I'm still missing something...
I have a text file which is a simple database:
Key01 Text01 Url01 Key02 Text02 Url02 ....
I'd like to insert after
<a href="anUrl" class="thisClass">Key01<a>
the element
<a href="Url01">Text01<a>
I tried to reuse the "Dumb Quotes" from 'Dive Into Greasemonkey' by replacing
I've just started some JavaScript development, but have run into a bit of a problem with a Greasemonkey script I'm working on. This script is for personal use. I'm doing a variety of things on a page, including auto-refreshing it. I want to display the number of clicks (preferably just on links) since the last refresh.
Anyone know where to get a Tool Tips javascript that will pop up a little box when hovered for words that needs more explanation. I'm using Front Page BTW.
Using IE6 on Win2000, I went to the tooltips demo. Try resizing the browser so that the tipped phrase "lorem ipsum" in the first para is close to the right hand edge, then when you mouse the phrase, to stay in the window, the tip box resizes itself to be several rows high. This means it projects down over the phrase that it popped up from.
If in doing so, the tip finds itself under the mouse, it promptly closes. Then the mouse is again over the words, so the tip reappears, but the tip is under the mouse, so it closes, etc, etc, etc.
I am interested in creating a tool for other webmasters to place on their website. Basically, I want it to be like a random quote generator, so that every time their page is viewed a random quote will be shown. I can do this using PHP and MySQL, but it works much better for using just on my own website than for providing to others. Does anyone know of a tutorial that can explain this process by using javascript?
I have been tasked with reproducing something quite similar to the following website [url]...
I examined the site, and after looking at the source I have determined that a lot of it looks like it was coded in JavaScript. While I do know a bit of JavaScript but I must admit it's not the sharpest tool in my arsenal.
Since this "application" will be heavy on the JavaScript interface, I was wondering if there was a GUI RAD tool for JavaScript similar to Visual C# for .NET.
So far I have looked into Visual Web Developer 2010 Express, Dreamweaver, and most recently the Google Web Toolkit (with GWT Designer), is anyone familiar with any of these tools, and will any of these help me develop a largely GUI based JS application?
I am writing a database which I edit locally using PHP / MySQL / JavaScript. What I currently do is to list all my DVD covers from a single folder into a drop box but what I would LIKE to do is to have a browsing facility (similar to uploading files) which is obviously a lot quicker. However, what I need is not an upload file form object, rather a simple click button which will open a browser, allow me to select a file and return the name of the file - just the file not the full directory structure. Is it possible to either just get the file upload form object to return just the name or, using either PHP or JavaScript write a function that will do what I need?
In my webpage there are acronyms that need explanation, for that I would like to display tip bubbles if possible, but I have not found any information regarding this programming feature in the JavaScript language. I would very much appreciate to know if this feature is part of the JavaScript language.
What I am sure of is that JavaScript has a method that displays a dialog box called 'alert(...).
I would like to display an alert dialog box when the user clicks on the acronym. Can anyone tell me how to accomplish this though an example. Please note that all the examples I have seen refer to 'check boxes' or 'buttons', but not to just words on the document.
I need a window that opens up with no Toolbars. I know how to achieve this from another window via a link. But is there a method to reload the current window with no tool bars.