Slashdot Mirror


Mouse Gestures in Javascript

christodd writes "I have become big fan of mouse gestures, a feature included in Opera, Mozilla, and MyIE2. There's even a plugin for IE. Other programs like StrokeIt and Cocoa Gestures are also based around the concept. I can't believe nobody else has thought of this before, but what about mouse gestures in javascript? Turns out that it is incredibly simple to implement, and really handy for those 'feature incomplete' web browsers. Unfortunately, for the total user experience, we'd have to upgrade the whole internet..."

9 of 377 comments (clear)

  1. Oh yay! by xSquaredAdmin · · Score: 3, Insightful

    Another annoying feature that wannabe web designers can add! Oh well. At least I don't have to worry about it. *Makes sure Disable Javascript is checked*

    --
    Crushing dreams at the speed of sarcasm
    1. Re:Oh yay! by dasmegabyte · · Score: 5, Insightful

      Word. The dumbest features ever thunk up by man are all tied to Javascript...the images that swirl around your cursor, preventing you from clicking on links. The script which loads everything at the same time, which means you wait forever for the one broken image. Cascading menus that don't disappear. Or do disappear, just as you are about to click on them.

      And worst of all, blocking the right mouse button (or as I like to call it, "the button i use to navigate the fucking internet") in the name of "copyright protection." Every time I see this monstrosity, I download all of the images from the site, stick them in a zip file, and email it to the webmaster. "Your copyright protection didn't work. Neither did the mouse button I use to open links in a new window. One of these things can be easily fixed."

      --
      Hey freaks: now you're ju
    2. Re:Oh yay! by PetiePooo · · Score: 3, Insightful

      Sure, Javascript has some useful features. Such as:

      -- Hiding the real URL of a link as the mouse hovers over it. Real useful. Thanks.

      -- Drop down menus. There are plenty of ways that do this without hiding the submenues from browsers used by the handicapped. Check into CSS (or even plain HTML!) for alternatives.

      -- Opening/resizing/closing browser windows. I've got the capability of doing that myself, thanks. If I want to open it within a new tab, this "feature" prevents me from doing that.

      -- Playing MIDI files while I view photos of your pet dog. AAaaaaiiieeeeeeee! (that's me screaming as I hit Alt-F4.)

      Now that we have those out of the way, I admit that there are some useful features. However, for each feature, there are alternatives that, in my mind, provide just as good or better ways to do it. The potential for abuse is too great, and some browsers provide too few abilities to limit abuse while retaining the usefulness. Mozilla and Privoxy in combination are doing a decent job for me for now.

      In effect, your second statement is what I'm saying by simply "Voting with my Back Button." If your web site annoys me, sometimes I'll give you the courtesy of emailing to tell you why I moved on. More often, I'll just silently move on.. and my $$$ goes somewhere else than feeding your progeny.

      Its hard to make something foolproof; fools are so ingenious! The advertisers/spammers will always figureout someway to screw it up..

    3. Re:Oh yay! by dublin · · Score: 4, Insightful
      As a web developer myself, I feel that javascript's time has come (one third of mozilla is written in Javascript), but users like you who view the world in only black and white are going to slow down its adoption and dampen the usefulness of javascript webpages. Certainly 1/3rd of Mozilla isn't gimmicky cruft...

      Six months ago, I thought JavaScript was a joke, a toy scripting language that just pretended to have real capbilities. I am now FIRMLY convinced that JavaScript may well be the MOST important asset that we have in opposing anyone's efforts to take over, control, or "proprietize" the web, as Microsoft and Macromedia are rolling ahead to do, with .NET and the new Flash.

      Several reasons why I think JavaScript is the best choice for much app development today:

      • Ubiquitous environment: It's the closest thing we have to a universal platform. There is nothing else that even approaches its ubiquity and reach. Mac, Windows, Unix/Linux, whatever, it's there and it just works. No other environment is so pervasive. Like the Bourne Shell in the Unix world, you can count on its presence and rely on it to get the job done, regardless of the platform. No other environment can credibly make that claim today, and I see no other real challengers on the horizon from a cross-platform point-of-view.

      • Capability: There is very little you can't do with it (except the few things network-delivered code has no right doing in the first place, and that's a good thing!) In general, it's safer than Java because it's "sandbox" restricts it to the browser, limiting damage even if something does go wrong. In the better implementations (like Mozilla's) it is capable of absolutely staggering things - but doing so requires a good understanding not only of JavaScript, but also the DOM, CSS, and possibly XML. In reality, you need to know these things anyway, as they ensure your app is platform agnostic.

      • Compatibility: There are far fewer problematic incompatibilities across all the varying JavaScript/JScript/ECMAscript implementations than there are across different versions of the JRE, for instance. If Microsoft would pay some attention to web standards in IE, much of what's pain now would go away. I'm convinced this is why they refuse to fix many obvious bugs - it would weaken their efforts to force .NET on their customers.

      • Object Orientation: While not as snazzy as some other environments, JavaScript does have real objects, and you can do real oo work with it. I suspect the reason we haven't seen more acknowledgement of this is that the elite types turn up their nose at it before they even bother to find out what it can do... As Mozilla has clearly shown, JavaScript is up to doing the heavy lifting, and it's time for the effete snobs that claim otherwise to reassess their own bigotries.

      • Ease of use: JavaScript is not a hard language to get started in. It's easy to do many useful and interesting things with little effort. There is even a huge and rapidly growing base of JavaScripts to be leveraged out there - nothing as comprehensive as CPAN, but several that, taken together, are close.

      • Momentum: JavaScript is finally being recognized for its real abilities, rather than it's image as somethign best suited for only toys. Combined with the factors above, I think JavaScript is the most important development environment in the world today, and the only one that has a real chance of helping make sure that the web stays based on open standards and protocols.


      If you still think JavaScript is a steaming pile, commit to spending a few dozen hours cheking out what it can *really* do before giving up on what may well be the best hope for the open, interoperable future that is of the greatest benefit to us all.
      --
      "The future's good and the present is nothing to sneeze at." - Roblimo's last ./ post
  2. Accessability by goldspider · · Score: 5, Insightful
    While mouse-gestures sounds really neat to a lot of folks, 'features' like this only means more and more websites that are less accessable to people that require assistive technology such as screen-readers (most Javascript features are notorious for being inaccessable).

    It would be nice if, for once, web technology was developed that made content more accessable to people with disabilities instead of less.

    --
    "Ask not what your country can do for you." --John F. Kennedy
  3. RSI by Space+cowboy · · Score: 3, Insightful

    I've never been much of a fan of mouse gestures. Whenever you see someone using them, there's a rapid flick of the wrist in some angled direction... that can't be good for you if repeated often...

    In general I don't have much sympathy for RSI sufferers. (I was going to put sufferers in quotes, but thought better of it :-).

    I use a keyboard something like 8 hours a day, and have done for the last 15 years, programming computers. If anyone is a prime candidate, it's me, and no RSI as yet. On the other hand, I'm reasonably careful - I don't hammer the keyboard, and I try to rest all my forearms on the desk in front of the keyboard. Sensible things to minimise the effect... unlike "gestures", which are just a disaster waiting to happen, IMHO.

    Simon

    --
    Physicists get Hadrons!
  4. No, no, no, no, no. STANDARDS. by websensei · · Score: 4, Insightful

    This is inane.

    Repeat after me:
    "Web Standards."

    It belabors the obvious to point out that this will never be implemented my more than a tiny fraction of sites, that it actively interferes with normal point/click/drag behaviors (like highlighting text? click, drag left->right?) and that learning PER-SITE navigation is simply ridiculous.

    It's not that no-one's thought of it before, it's that it's a bad idea on the face of it.

    --

    La via sola al paradiso incommincia nel inferno
  5. Re:Why this is stupid. by cybermace5 · · Score: 3, Insightful

    This is a user interface feature that randomly turns on and off or changes behavior, depending on which web page you're on. How popular do you think the mouse would be, if for random periods it switched directions, reversed buttons, or turned off completely?

    --
    ...
  6. Gestures... I don't get it by Cereal+Box · · Score: 3, Insightful

    I don't get the fascination with mouse gestures. Is it really that much more convenient than clicking a button or pressing a key? From the Mozilla gestures page:

    View Source - Left-Down-Right-Down-Left (draw a squarish S)

    Is right-clicking and choosing "view source" such a chore that you'd rather draw "S" shapes instead?

    Reload (bypass cache) - Up-Down-Up

    I dunno, pressing "F5" always seemed to work for me.

    Personally I think the obsession with mouse gestures boils down to the typical geek fascination with things that, impractical and useless they may be, are just "exciting" for some reason.

    Hey look, Slashdot implemented gestures.

    Submit post - Left-Right-Up-Down-Down-Down-Up-Left-Down-Right-Up -Right. How did I ever live without these things?