Welcome guest, is this your first visit? Create Account now to join.
Page 2 of 5 FirstFirst 1234 ... LastLast
Results 11 to 20 of 50

This is a discussion on Mouse Gesture UserScript within the Chrome Plugins section, part of the Google Chrome category: It works! Kyrax was right, I modified the script and works like a charm on chrome 3.0.182.3 The final version ...


  1. #11
    horatzica is offline Junior Member
    Join Date
    May 2009
    Posts
    5

    Thumbs up

    It works!
    Kyrax was right, I modified the script and works like a charm on chrome 3.0.182.3

    The final version is:

    Code:
    // ==UserScript==
    // @name Mouse Gestures for Google Chrome
    // @author vhanla
    // @namespace http://www.codigobit.net/ 
    // @version 1.0
    // @description Allows to use mouse gestures for navigating through pages
    // @include *
    // @exclude
    // ==/UserScript==
    
    (function() {
    
    var posx = 0;
    var posy = 0;
    var estado = false; 
    var gestdown = function(event) {
    if (event.which)
    button = (event.which < 2) ? "LEFT" :
    ((event.which == 2) ? "MIDDLE" : "RIGHT");
    if (button =="RIGHT"){ 
    estado=true;
    posx=event.clientX;
    posy=event.clientY;
    document.oncontextmenu = new Function("return false")
    }
    }
    var gestup = function(event) { 
    if (estado){
    estado=false;
    if(event.clientX+25<posx){ 
    window.history.back(); 
    }
    else if(event.clientX-25>posx){ 
    window.history.forward();
    }
    else if(event.clientY-25>posy){
    window.open();
    }
    else if(event.clientY+25<posy){
    window.close();
    }
    else void(document.oncontextmenu=null)
    }
    
    }
    window.addEventListener("mousedown", gestdown, false);
    window.addEventListener("mouseup", gestup, false); 
    })();
    Thank you guys, now that I have gestures and adblock in chrome, I can change my primary browser to chrome

    Cheers!

  2. #12
    devilslackey is offline Moderator
    Join Date
    May 2009
    Location
    Orange County
    Posts
    330

    Default

    Kyrax is one cool cat, isn't he?

  3. #13
    Kyrax is offline Senior Member
    Join Date
    Apr 2009
    Location
    Qc, Canada
    Posts
    495

    Default

    Meow!

    Mouse gesture is something that I've always loved in a browser.
    If you guys need more feature from that script, I guess we could add some..

    Maybe we should get someone to work on a mouse gesture extension (instead of a userscript).

  4. #14
    devilslackey is offline Moderator
    Join Date
    May 2009
    Location
    Orange County
    Posts
    330

    Default

    Mouse gestures aren't my thing but if you are volunteering yourself to work on an extension I'll volunteer myself to help test ;-)

  5. #15
    horatzica is offline Junior Member
    Join Date
    May 2009
    Posts
    5

    Thumbs up

    Count me in, at least for testing.

    I was wondering if it can be rewritten to read "complex" gestures: up-down, down-left, etc. Maybe saving some points during a gesture and match that to a library of gestures.
    Secondly, leave a trail like in other browsers/extensions to see what what you are doing. Can it be done using the canvas Mr. Vic Gundotra (Google) was talking about as a new feature in HTML5? (I maybe talking crazy here )

  6. #16
    Kyrax is offline Senior Member
    Join Date
    Apr 2009
    Location
    Qc, Canada
    Posts
    495

    Default

    horatzica, you are right on pretty much everything.

    Yes, it can be rewrittern to read complex gestures. Yes, to do that the best option should probably be to save some points during a gesture and match it to a library of existing gestures or to a self made gesture.

    As for the trail, yes this can probably be done using the canvas tag. You could also for example draw a letter " x " on the whole mouse gesture.

    I don't think i'll volunteer myself. I already am quite busy this summer (Not busy enough to stop me from posting here it seems)

  7. #17
    alinescoo is offline Member
    Join Date
    May 2009
    Posts
    83

    Default

    It seems that by starting digging into this, we came to a great solution. Kyrax thank you for fixing this. By this mouse gesture is added. AdSweep does it's job pretty good, but not as good as Adblock from firefox. What I really miss is the smooth scroll feature. In rest, chrome would be the real deal.

  8. #18
    Kyrax is offline Senior Member
    Join Date
    Apr 2009
    Location
    Qc, Canada
    Posts
    495

    Default

    Maybe you should create a request thread under "Plugins" for a "smooth scroll" feature.

    Not sure what you mean, but I bet someone could help you.

  9. #19
    sulasno's Avatar
    sulasno is offline Super Moderator
    Join Date
    Sep 2008
    Location
    Bangkok
    Posts
    1,759

    Default

    @horatzica

    thanks for the script

    working in Chromium 3.0.183.0 (17340) under Win 7

    EDIT

    funny though; it's not working in Chrome 3.0.182.3 and Chromium 3.0.183.0 (17360) with WinXP
    Last edited by sulasno; 06-02-2009 at 12:15 AM. Reason: added info

  10. #20
    Chrome's Avatar
    Chrome is offline Administrator
    Join Date
    Sep 2008
    Posts
    345

    Default

    Can anyone just packaget it into .crx extension form??

Page 2 of 5 FirstFirst 1234 ... LastLast

Similar Threads

  1. Chrome Mouse Gestures?
    By Wisher in forum Chrome Plugins
    Replies: 40
    Last Post: 12-28-2010, 08:33 PM
  2. Back / forward buttons on mouse
    By Illway in forum Bugs and Vulnerabilities
    Replies: 1
    Last Post: 03-26-2009, 11:55 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •