| |||||||
| Top Tip : Click here to Boost Your PC & Chrome Browsing Speed |
![]() |
| | Thread Tools | Display Modes |
|
#111
| |||||
| |||||
| Quote:
Quote:
Quote:
Quote:
Quote:
Code: // ************... // // // // ************... 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 |
|
#112
| ||||
| ||||
| 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 ;-) |
|
#113
| |||
| |||
| 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. |
|
#114
| |||
| |||
| Quote:
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. |
|
#115
| |||
| |||
| Quote:
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. |
|
#116
| ||||
| ||||
| 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 |
|
#117
| |||
| |||
| @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"); |
|
#118
| ||||
| ||||
| @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.. |
|
#119
| |||
| |||
| Quote:
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.. |
|
#120
| ||||
| ||||
| @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: |
![]() |
| 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 |