Go Back   Google Chrome Forums > Google Chrome > Chrome Plugins


http://chromeplugins.org/frwrdicon.jpg
Top Tip : Click here to Boost Your PC & Chrome Browsing Speed
Reply
 
Thread Tools Display Modes
  #111  
Old 07-20-2009, 08:57 PM
Waha's Avatar
Senior Member
 
Join Date: Apr 2009
Location: Oregon
Posts: 601
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
Libraries: bliplib
Tools: manifest syntax highlighting & snippits
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #112  
Old 07-21-2009, 12:32 AM
StevePaul's Avatar
Senior Member
 
Join Date: Mar 2009
Location: Birmingham, England
Posts: 1,415
Send a message via MSN to StevePaul
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 ;-)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #113  
Old 07-21-2009, 03:19 PM
Senior Member
 
Join Date: Jul 2009
Posts: 124
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #114  
Old 07-21-2009, 03:27 PM
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #115  
Old 07-21-2009, 04:17 PM
Senior Member
 
Join Date: Jul 2009
Posts: 124
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #116  
Old 07-21-2009, 04:35 PM
broman.m's Avatar
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #117  
Old 07-21-2009, 08:33 PM
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #118  
Old 07-21-2009, 09:11 PM
StevePaul's Avatar
Senior Member
 
Join Date: Mar 2009
Location: Birmingham, England
Posts: 1,415
Send a message via MSN to StevePaul
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 09:20 PM..
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #119  
Old 07-21-2009, 10:16 PM
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 10:31 PM..
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #120  
Old 07-21-2009, 11:36 PM
StevePaul's Avatar
Senior Member
 
Join Date: Mar 2009
Location: Birmingham, England
Posts: 1,415
Send a message via MSN to StevePaul
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 07:21 AM.. Reason: Added PS:
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
chrome gestures, google chrome gestures

Thread Tools
Display Modes

Similar Threads
Thread Thread Starter Forum Replies Last Post
Chrome Mouse Gestures? Wisher Chrome Plugins 36 10-21-2009 03:16 AM
New Chrome Mouse Gestures Plugin (Rocker support) OwenCM Chrome Plugins 1 05-06-2009 12:38 AM
Chrome Custom Mouse Gestures Laoguy Chrome Plugins 6 04-15-2009 05:52 AM




Chrome Central - Chrome Talk - Chrome Tips and Tricks - Chrome Plugins - Chrome Themes - Chrome Tools - Bugs and Vulnerabilities - Chrome Tech - General Chat


All times are GMT. The time now is 06:29 AM.


Powered by vBulletin® Version 3.7.4 PL1
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Google Chrome and Google™ is a Trademark of Google Inc
This site chromeplugins.org is not affiliated with or sponsored by Google Inc.
Thanks: Taree SEO Forum and John