Welcome guest, is this your first visit? Create Account now to join.
Page 5 of 5 FirstFirst ... 345
Results 41 to 50 of 50

This is a discussion on Mouse Gesture UserScript within the Chrome Plugins section, part of the Google Chrome category: Features for the first release of ChromeGestures will include : - Move recognition - A move is either 'up', 'down', ...


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

    Default

    Features for the first release of ChromeGestures will include :

    - Move recognition
    - A move is either 'up', 'down', 'left' or 'right'

    - Gesture recognition
    - A gesture is a combination of moves

    - Action execution
    - An action is something you want to happen after a gesture. It will be easy to associate an action with a gesture.

    - Easy to use action API
    - By editing a single file, using a simple syntax, you will be able to add your own actions. Knowledge of javascript will be required as the action you want to associate with your gesture has to be coded by you, using javascript.

    - Easy to use gesture API
    - By editing a single file, using a simple syntax, you will be able to add your own gestures. You decide what each gesture does.

    - Basic actions will be included
    - Open a new tab, close current tab, back, next will already be included (More will come.. but this is a beta, remember )

    - Future releases will include :
    - Possibility to use the Chrome API in your actions. That means you will be able to create bookmarks, cross site XHR, etc..

    - Possibility to interact with existing extensions. If your extension supports it, you will be able to have it triggered by a gesture.

    - Possibility to interact with the content of a page. This won't be for a little while. But I plan on supporting interactions with content scripts as well.

    And one day, I plan on making an easy to use UI that will customize these gestures and actions for you. This will have to wait for HTML5 storage however.
    Last edited by Kyrax; 06-19-2009 at 11:06 AM.

  2. #42
    Marble is offline Junior Member
    Join Date
    Jun 2009
    Posts
    2

    Default some modifications

    Since Google added signature support in latest dev build 3.0.189.0, the old extension package won't work any more. A new package is require, but we can simply use the JavaScript as user scripts (put it in the "User Script" folder, and refresh the page). A few comments should be added to make it better:
    Code:
    // @run-at document-start
    // @match http://*
    // @match https://*
    // @match chrome://*
    // @match file:///*
    // @match about://*
    The first comment is to run the script earlier that you don't need to wait for the page to be completely loaded. Others are for different protocols, you can add more on your own.

  3. #43
    alinescoo is offline Member
    Join Date
    May 2009
    Posts
    83

    Default

    I'm just curious how development is going ?

  4. #44
    Luc VN's Avatar
    Luc VN is offline Senior Member
    Join Date
    Sep 2008
    Location
    Belgium - Europe
    Posts
    758

    Default

    Concerning mouse gestures I found this script and this other script on www.Userscript.org

    Did you take a look at those? If not convenient that could be a help or a base for the ideal thing...

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

    Default

    I won't promise anything in case something terrible happens. But first beta release should be this evening.

    There are some silly bugs but overall, it's a pretty functional extensions.
    My main concern is that Chrome doesn't seem to like window.close() that's why those userscripts might have some problem with it. Chrome Gestures will (eventually) support the Chrome API so it will allow you to close windows reliably.

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

    Default

    I totally forgot that tonight is Quebec's national day.
    I'm off to party

    I'll be releasing ChromeGestures beta 0.1 tomorrow.
    Sorry guys

  7. #47
    Marble is offline Junior Member
    Join Date
    Jun 2009
    Posts
    2

    Default more modificatons

    Changed gesture "up" to reload and added combinations:
    "down"+"right"->close;
    "left"+"up"->print
    Fix bug:
    Gesture can't close tabs opened by other tab, only parent itself
    TBI:
    "down"+"left"->reopen closed tab
    "up"+"right"->duplicate tab
    not figure out ways to implement these feature in Chrome.

    Code:
    // ==UserScript==
    // @name Mouse Gestures for Google Chrome
    // @author vhanla, modified by Marble
    // @version 1.1
    // @description Allows to use mouse gestures for navigating through pages
    // @include *
    // @exclude
    // @run-at document-start
    // @match http://*
    // @match https://*
    // @match chrome://*
    // @match file:///*
    // @match about://*
    // ==/UserScript==
    
    var posx = 0;
    var posy = 0;
    var estado = false; 
    //var my_window;
    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) //left
    {
    	if(event.clientY-25>posy) //down + left: n/a yet
    		{
    		;
    		//reopen closed tab, TBI
    		}
    	else if(event.clientY+25<posy) //up + left: print page
    		{
    			window.print();
    		}
    	else window.history.back(); //left only: back
    }
    else if(event.clientX-25>posx) //right
    {
    	if(event.clientY-25>posy) //down + right: close
    		{
    		window.open('', '_self', ''); //bug fix
    		window.close();
    		}
    	else if(event.clientY+25<posy) //up + right:n/a yet
    		{
    			;//duplicate tab, TBI
    		}
    	else window.history.forward(); //right only: forward
    }
    
    else
    {
    	if (event.clientY-25>posy) //down only: new
    	{
    		window.open();
    	}
    	else if(event.clientY+25<posy) //up only: refresh
    	{
    		window.location.reload();
    	}
    	else void(document.oncontextmenu=null)
    }
    }
    
    								}
    window.addEventListener("mousedown", gestdown, false);
    window.addEventListener("mouseup", gestup, false);
    Save above code to gesture.user.js and put it in "User Scripts" folder, and refresh page.

    --Marble
    Last edited by Marble; 06-24-2009 at 05:18 AM.

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

    Default

    Please see ChromeGestures beta 0.1

    Sorry for the delay.

  9. #49
    hatbout is offline Junior Member
    Join Date
    Jun 2009
    Posts
    2

    Default

    Marble's gesture user script works flawless here. It can close the tab!! I also tried Kyrax's ChromeGestures beta 0.1, but it can not close the newly created tab?
    Last edited by devilslackey; 06-26-2009 at 03:52 AM. Reason: Removed quote.

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

    Default

    You don't have to post the whole friggin post in quotes.

    You can define your own gestures in Chrome gestures. That's the whole point of the extension. All you have to do is use the correct javascript required to enable window.close() and put in there with your own gesture.

Page 5 of 5 FirstFirst ... 345

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
  •