Page 12 of 20 FirstFirst ... 21011121314 ... LastLast
Results 111 to 120 of 193

This is a discussion on [Ext/US] Chrome Gestures (modified) within the Chrome Plugins section, part of the Google Chrome category: Originally Posted by StevePaul One of the 'selling' points when you first embarked on developing this extension was that you ...


  1. #111
    Waha's Avatar
    Waha is offline Senior Member
    Join Date
    Apr 2009
    Location
    Oregon
    Posts
    788

    Default

    Quote Originally Posted by StevePaul View Post
    One of the 'selling' points when you first embarked on developing this extension was that you could 'easily' create your own gestures ...
    No matter what, unless we somehow implement an extremely limited drag and drop "programming" interface, its going to be somewhat higher-level to add your own actions for gestures. We can't really fix that..

    Quote Originally Posted by StevePaul View Post
    ...
    All I've done is to highlight the areas that you need to pay attention to if you want to create your own, basically everything above the 'UNLESS YOU KNOW WHAT YOU ARE DOING, DON'T EDIT PAST HERE' ...
    If it's just little comments I don't mind. Originally it seemed like you were adding some extreme details or something.

    Quote Originally Posted by StevePaul View Post
    ...
    In addition if people customise your current defaults (gestures), the next time you issue a new version these will be effectively overwritten, again the documentation just highlights this fact ...
    Don't forget, Chrome keeps the old versions in the folder, so you can still grab them there.

    Quote Originally Posted by StevePaul View Post
    ...
    You already have the ability to change the NewTab page and Popuploader (which again will be overwritten with any new release)
    ...
    I really really hope communication is fixed by next release and we can get rid of the popup loader all together.

    Quote Originally Posted by StevePaul View Post
    ...
    I think you'll find what I have done is a healthy addition to what is already a good product and makes it easier to understand what the script is all about...

    Anyway, the three of you have a look and see what you think ;-)

    PS: Just emailed your account at LogicPlace with my version of the script (1.0.6) ;-D
    It looks nice, one thing though. In the "add your own" gestures sections, you have a
    Code:
    // ************...
    //
    // 
    // 
    // ************...
    section.. I assume that's where you were intending the script to go right? If so I think it'd be better off without the //s indicating the space, so that no one will unknowingly past some code there without removing the comments and end up not getting it executed.
    So yeah, I trimmed it a little bit and added a [ where you accidentally deleted one on the left-hand side of a name.
    ~ Projects ~
    Specialized: Carapass Auction Watcher, Kongregate Chat
    Libraries: bliplib
    Tools: manifest syntax highlighting & snippits
    ~ Happy to make extensions for pay too ;D ~
    Portfolio: Search and Share

  2. #112
    StevePaul's Avatar
    StevePaul is offline Senior Member
    Join Date
    Mar 2009
    Location
    Birmingham, England
    Posts
    1,522

    Default

    I'm really glad you like it, look forward to seeing it in the next release ;-)

    As for the 'additions' section, I was torn between what I did and leaving it as spaces, on reflection I agree with you, spaces is best...

    I just knew I'd 'chop' something somewhere, spotted it about 5 mins after I Emailed you (typical), at least it was only a comment and didn't affect the functionality (I know I tested it !!) ...

    Just a tip if you do customise the code ...

    Rather that having to 'search' through the previous version for your amendments, what I did was to have a document (Word, could be anything) and keep all my customisations in it (in sections, eg Gestures, Actions, Relations) then you just 'copy' and 'paste' on block to the relevant sections of the script ...

    Takes me about two mins to update the latest release with my mods ;-)

  3. #113
    OpenNingia is offline Senior Member
    Join Date
    Jul 2009
    Posts
    123

    Default

    I want to propose an idea.
    I read ChromeGesture's source code and It's really simple.

    I propose to write a desktop application to generate its own ChromeGestures.crx, providing an UI to add custom gestures with predefined actions.

    Upon generation users only need to install the extension dragging the crx file onto chrome.

  4. #114
    Kryptyx is offline Member
    Join Date
    Jul 2009
    Posts
    59

    Default

    Quote Originally Posted by OpenNingia View Post
    I want to propose an idea.
    I read ChromeGesture's source code and It's really simple.

    I propose to write a desktop application to generate its own ChromeGestures.crx, providing an UI to add custom gestures with predefined actions.

    Upon generation users only need to install the extension dragging the crx file onto chrome.
    This has my mind spinning in all kinds of directions. I would not do a desktop Application but instead do a Web Application. The trick would be writing the crx server side.

    I think this gets away from the end-goal of what we want CG to do. I think you will eventually see a nice interface for customizing your gestures right inside Chrome. One idea that would be nice would be to "record" your gesture and then set an action for the recorded gesture.

  5. #115
    OpenNingia is offline Senior Member
    Join Date
    Jul 2009
    Posts
    123

    Default

    Quote Originally Posted by Kryptyx View Post
    This has my mind spinning in all kinds of directions. I would not do a desktop Application but instead do a Web Application. The trick would be writing the crx server side.

    I think this gets away from the end-goal of what we want CG to do. I think you will eventually see a nice interface for customizing your gestures right inside Chrome. One idea that would be nice would be to "record" your gesture and then set an action for the recorded gesture.
    Recording a gesture is really a trivial matter, just enter in "recording mode" ( i.e. by clicking on a toolstrip ) and the same way you recognize a gesture you can record it.

    The tricky part is how to assign actions to the just recorded gesture.
    At the moment, the only way is to code it yourself, that is because I though about code generation.

    If you find a better way to insert and store procedures to trigger on gestures then we are done

    PS. A web application is nice but will require an hosting, a domain and other expensive things.

  6. #116
    broman.m's Avatar
    broman.m is offline Member
    Join Date
    Jun 2009
    Posts
    41

    Default

    I wrote this in the wrong thread.. just noticed I used this, and not beta :O

    I'm trying to add my own script.. but I could use some help

    I want to add up-right to change the active tab to the one on the right side of the current tab, and same with up-left! Anyone know what function does that
    I know basics of js/html.. but this is above me ^^
    Born of evil, living by the day, I seek not redemption - but the end of humanity

  7. #117
    Kryptyx is offline Member
    Join Date
    Jul 2009
    Posts
    59

    Default

    @broman.m:
    Unfortunately this is not an option at the moment. It's an issue with Chrome not the extension. Once they add communication back to extensions we will try and get this added.

    @OpenNingia:
    Yes, it would be easy for us to record gestures but a bigger issue we have at the moment is the fact that we can not save any data. Once that ability is added in then I'm sure you will see this feature come to life.

    -------------

    On a side note, I did some rather large revamping on how we define new gestures. To give everyone an insight on this change I will post a small excerpt from the new JS file.

    Code:
    // Revamped the way we define gestures, to define a new gesture simply call the newGesture function with the correct paramaters.
    // newGesture("moves", action, "description", "coords");
    // Moves = The pattern needed to trigger the gesture, seperate each move with a space. (ex. "left right click down")
    // Action = The action that the gesture triggers, do not use quotes.
    // Description = The description of the gesture for the help page, this is optional.
    // Coords = The coords to draw the gesture on the help page, this is optional.
    
    newGesture("down right", newTab, "Open a new tab. You can set the homepage in options.", "20,20,60,60");
    I'm hoping that this will make things easier for people to create a new gesture, it also cleans up some of the redundant code.

  8. #118
    StevePaul's Avatar
    StevePaul is offline Senior Member
    Join Date
    Mar 2009
    Location
    Birmingham, England
    Posts
    1,522

    Default

    @Kkyptyx

    Have you spoken to Kyrax and Waha lately ...

    I did quite a lot of work on the Script and if your not using what potentially is the new version it could cause a problem ...

    These are Kyrax and Waha's comments ...

    [Ext/US] Chrome Gestures (modified)

    [Ext/US] Chrome Gestures (modified)
    Last edited by StevePaul; 07-21-2009 at 10:20 PM.

  9. #119
    Kryptyx is offline Member
    Join Date
    Jul 2009
    Posts
    59

    Default

    Quote Originally Posted by StevePaul View Post
    @Kkyptyx

    Have you spoken to Kyrax and Waha lately ...

    I did quite a lot of work on the Script and if your not using what potentially is the new version it could cause a problem ...

    These are Kyrax and Waha's comments ...

    [Ext/US] Chrome Gestures (modified)

    [Ext/US] Chrome Gestures (modified)
    Yes I have, this new way of creating gestures should prove to be much easier to manage.

    Since some people do not see the benefit of this design I will try and give examples.

    OLD WAY:

    Step 1: Create the gesture variable
    var newTabGesture = ["down","right"];

    Step 2: Create the action
    function newTabAction() {
    window.open(newTabURL);
    }

    Step 3: Link the gesture and the action
    myGestures[newTabGesture] = newTabAction;

    Step 4: Add the gesture to the help file (optional).
    registerForHelp(newTabGesture,"Open a new tab. You can set the homepage in options.",20,20,60,60);

    NEW WAY:

    Step 1: Create a newGesture
    newGesture("down right", newTab, "Open a new tab. You can set the homepage in options.", "20,20,60,60");

    Step 2: Create the action
    function newTab() {
    window.open(newTabURL);
    }

    -----

    The new way merges step 1, 3 and 4 into 1 function. This cleans up a lot of redundant code that could potentially confuse people. It also means that all the gestures are sent to 1 single function (newGesture) which will allow us to extend and add validation and sanitation later on if we choose to.

    This does mean that existing customizations will need to be re-done, but its better to do that now than later down the road. Also it allows us to keep the extension smaller and more lightweight in size. If for example we had over 100 gestures, this new method cuts out 200 lines of code. I'm not saying we would ever have that many, but I just wanted to make a point.

    EDIT:
    Furthermore we should not need to add ASCII art and large comments in the source files, we have a wiki to handle that.
    Last edited by Kryptyx; 07-21-2009 at 11:31 PM.

  10. #120
    StevePaul's Avatar
    StevePaul is offline Senior Member
    Join Date
    Mar 2009
    Location
    Birmingham, England
    Posts
    1,522

    Default

    @Kryptyx

    Don't have a problem with consolidation of code ...

    However you need to be careful of adding functionality just for the sake of it ...

    For example you currently have a 'Google search' gesture which is nice, but surplus (imo) to requirements ...

    I use an extension which (without a click in sight) provides me with 6 options when highlighting text, which includes a 'Google search' and 'Translation' and another 6 or 7 options on one click.

    Mouse gestures should be about doing the day to day activities, Chrome is heavily built around keyboard shortcuts and it is these (imo) that you should look to be replacing ...

    Already CG is at the point where it does the good things really well and I would suggest people are already at the point where they will stay with the version they have because they can customise it (with their own gestures) and don't want to be continually having to edit new code ....

    As for confusion, the creation of a gesture (in its current form) has a logical flow (Gesture, Action, Relations) so I don't see a problem there and it is all nicely packaged at the beginning of the script and easily readable ...

    In reality you are not going to have loads of gestures, so changing the format isn't really (imo) achieving anything, other than p****** a few people off !!

    The one advantage to the 'Old Way' was that you could easily identify the names of the gestures and their movements.

    var newTabGesture = ["down","right"];

    Gesture is called newTabGesture and the movements are down and right ...

    Whereas ...

    newGesture("down right", newTab, "Open a new tab. You can set the homepage in options.", "20,20,60,60")

    You are searching to discern the name of the gesture and the movements, especially if there are more than just a couple of movements ...

    There's an old saying 'If it ain't broke, don't fix it !!'

    Just my opinion;-)

    PS: I don't know who taught you to program (don't want to really), but the one thing you should know is that 'Comments' are the 'Life blood' of good coding and just as important (probably more so) as the code itself...

    A line or two of carefully constructed comments can explain a hundred lines of code succinctly, saving ambiguity and misunderstanding and providing clarification to even the most uneducated (in terms of programming) user ... ;-)

    Finally Wiki (like user guides) are by definition high level, if you want to edit code you need to know where to do it (more importantly - how) and that's what comments are for ;-)
    Last edited by StevePaul; 07-22-2009 at 08:21 AM. Reason: Added PS:

Page 12 of 20 FirstFirst ... 21011121314 ... LastLast

Similar Threads

  1. Chrome Mouse Gestures?
    By Wisher in forum Chrome Plugins
    Replies: 40
    Last Post: 12-28-2010, 08:33 PM
  2. New Chrome Mouse Gestures Plugin (Rocker support)
    By OwenCM in forum Chrome Plugins
    Replies: 1
    Last Post: 05-06-2009, 01:38 AM
  3. Chrome Custom Mouse Gestures
    By Laoguy in forum Chrome Plugins
    Replies: 6
    Last Post: 04-15-2009, 06:52 AM

Tags for this Thread

Posting Permissions

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