Large

Mousehunt Helper

By DSXC Last update May 24, 2012 — Installed 45,553 times.

mousedown vs click events

in
Subscribe to mousedown vs click events 3 posts, 2 voices



bmn Scriptwright
Firefox

Hi. Great script. I was wondering if there was a particular reason you used the "mousedown" event for the event listeners instead of "click". The main difference here is that "mousedown" responds to right-click, middle-click, etc while "click" only catches left (more specifically, primary) clicks. It may be a subtle change but I had an unintended quick travel out of Zugzwang Tower as I was exploring your script. I made the code replacement and it does not seem to have broken anything in Firefox 4 yet. Thanks.

 
bmn Scriptwright
Firefox

Also, off-topic but not really significant enough to create a new thread for: to avoid cross-site scripting issues and repeated page loads for your audio alerts, you can save them in your source like you did your images. Passing a data URI variable to your AlertSound function works without change. If credit to the source is an issue you can always include it in a comment with the definition of the sound bite.

 
DSXC Script's Author
FirefoxWindows

Hey bmn, thanks for pointing those out to me.

I think I might implement a warning system when traveling away from specific areas, like the tower, to stop that from happening again and also changing the mousedown events to click events.

With the audio, the credit isn't so much an issue as they are legacy game sounds anyway, just makes the script larger again >.>.

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel