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..."

14 of 377 comments (clear)

  1. FVWM by Anonymous Coward · · Score: 4, Informative

    dont forget fvwm, create your own mouse gestures, 'Strokes', and bind them to any action/command.

    KICKS ASS.

  2. Browser Level == Better by dolo666 · · Score: 5, Interesting

    I'm all for the idea of faster, better, stronger ways of browsing. I happen to think that mouse gestures and browser level code should be based in the browser, and controlled by the browser. Like look at all the gestures you get with Mozilla.

    (mo: Don't invent the wheel: we have it already)

    The problem I forsee with the jscript use, is a misuse of the mouse gesture jscripts by unethical sites. Because it's the planet Earth, and The Internet, half of the sites will impliment this correctly, the other half will use it as a joke, or for annoying adverts (browser interstitials) and thus cause the whole thing to be crap.

    If it's at a browser level, websites can't fuck with it. So ideally, browsers will want to add the ability to block javascript mouse control, and promptly add this cool feature at a browswer level. I'm all for the idea of mousegestures, but I'm against the ability to tell a website to fuck off using them. (mo: KISS).

    1. Re:Browser Level == Better by Zeinfeld · · Score: 5, Interesting
      The problem I forsee with the jscript use, is a misuse of the mouse gesture jscripts by unethical sites.

      I think that is the problem with Jscript full stop. why netscape thought it a good idea to allow any site an almost arbitrary level of control over my browser is beyond me.

      The idea of doing mouse guestures or any other browser extension in JScript, except as a demo is idiotic. The whole value of these systems comes from consistency. Apple do know some things about UIs, the value in the Apple UI is that every program work the same way and you don't have to spend lots of time relearning.

      If I go to one site that has mouse guestures and then another that does not or worse implements them a different way ... yuk!

      But back to the original issue, Jscript sucks. The command set should be partitioned according to the security considerations. Popping up a window has a significant security impact, it can be used to launch a trojan. The toolbars on the browser window are my toolbars, no web site should be able to disable them.

      I use the feature of IE that allows Jscript to be turned off by default and enabled selectively site by site. But this is not as effective as it could be because you often come across idiotic sites using jscript for everything - including navigation. The idea being to force the site designers idea of a user interface down the user's throat.

      --
      Looking for an Information Security student project suggestion?
      Try http://dotcrimeManifesto.com/
  3. Insert code with proxy... by KrispyKringle · · Score: 5, Interesting

    Or you could have your filtering proxy (like Proxomitron or Privoxy) insert the JavaScript code on every page. Though personally, I'd just use a browser that suppots it.

  4. 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
  5. Re:Oh yay! by DeadSea · · Score: 5, Interesting
    I tried some of the mouse gestures on that page and they conflict with other things for which I use the mouse. For example, try selecting a paragraph of text on the page. It activates one of the mouse gestures causing the page to scoll.

    Really annoying.

  6. Pie menus by Russ+Nelson · · Score: 4, Interesting

    Actually ... mouse gestures are better implemented as Pie Menus.
    -russ

    --
    Don't piss off The Angry Economist
    1. Re:Pie menus by eggz128 · · Score: 4, Informative

      And Mozilla users can get an excellent pie menu extention here .

      Browsing just doesnt feel right without it :)

  7. Why this is stupid. by cybermace5 · · Score: 4, Interesting

    Honestly, it's a pretty stupid idea. Let me illustrate why: scroller mice. Once you get used to a scroll mouse, then you have to use a computer that just has a normal mouse, it's a major pain.

    If you depend on every web page to implement mouse gestures, then you'll get this effect from page to page while you're browsing! It would be annoying to no end. And it's not an easily visible thing you can check for, unless each web page also uses some kind of cheesy "Gestures Enabled" logo. And each site might implement it differently, so that strokes mean different things from page to page. I repeat: stupid idea.

    A user interface tool should be just that: part of the user interface. Just like a keyboard or mouse, gestures take time to become accustomed to. A user interface feature needs to act the same way no matter what you're doing.

    --
    ...
  8. Actually... by interiot · · Score: 4, Informative

    Actually... Mozilla's gestures *are* implemented in javascript. Download the Optimoz MozGest .xpi file (or find it on your hard drive), open the .xpi file in winzip, and there's all the .js implementation for it.

  9. Re:In other words == mo by plumby · · Score: 4, Informative


    The two aren't particularly equivalent - i.e. is short for id est - meaning "that is", or "that is to say".

    Modus operandi, on the other hand, means "the way of working", not really applicable in your message.

    Don't let Microsoft make you misuse your Latin abbreviations.
    </pedant>

  10. 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
  11. 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
  12. 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