====== CrxGestures ====== This plugin works well, but you gotta **say no to advanced features** (spy crap). It doesn't sync with chrome settings like it should, so here are my settings ([[https://pastebin.com/Xu98SkJa|pastebin mirror]]): { "cfgver": "4.4.4", "cursor": { "img": null, "scale": 1 }, "drag": { "ddirect": true, "ddirectcolor": "778899", "ddirectopa": 0.9, "dholdkey": "none", "dragimage": false, "draginput": false, "draglink": false, "dragtext": false, "dragui": true, "dstroke": true, "dstrokecolor": "4E1485", "dstrokeopa": 0.8, "dstrokewidth": 5, "dtooltip": true, "dtooltipcolor": "120310", "dtooltipopa": 0.9, "dtooltipwidth": 18, "image": [ { "action": "I_open", "direct": "L", "moreDes": "Open image in new tab(New tab & Background)", "morePinned": "unpinned", "morePosition": "left", "moreTarget": "newback" }, { "action": "I_open", "direct": "R", "moreDes": "Open image in new tab(New tab & Front)", "morePinned": "unpinned", "morePosition": "right", "moreTarget": "newfront" }, { "action": "I_save", "direct": "D" } ], "imgfirst": "none", "imgfirstcheck": false, "link": [ { "action": "L_open", "direct": "L", "moreDes": "Open link in new tab(New tab & Background)", "morePinned": "unpinned", "morePosition": "left", "moreTarget": "newback" }, { "action": "L_open", "direct": "R", "moreDes": "Open link in new tab(New tab & Front)", "morePinned": "unpinned", "morePosition": "right", "moreTarget": "newfront" }, { "action": "L_copytext", "direct": "D" }, { "action": "L_copyurl", "direct": "U" } ], "setdragurl": false, "text": [ { "action": "T_search", "direct": "L", "moreDes": "Use %name to search \"%s\"(New tab & Background)", "morePinned": "unpinned", "morePosition": "left", "moreTarget": "newback", "moreTsearch": "sgoogle" }, { "action": "T_search", "direct": "R", "moreDes": "Use %name to search \"%s\"(New tab & Front)", "morePinned": "unpinned", "morePosition": "right", "moreTarget": "newfront", "moreTsearch": "sgoogle" }, { "action": "T_copytext", "direct": "D" } ] }, "extid": "jlgkpaicikihijadgifklkbpdajbkhjo", "gesture": { "direct": true, "directcolor": "778899", "directopa": 0.9, "gesPos": "cc", "geskey": "right", "gesture": [ { "action": "G_back", "direct": "L", "whitelist": [] }, { "action": "G_go", "direct": "R", "whitelist": [] }, { "action": "G_close", "direct": "DR", "moreCloseopts": "close", "moreClosesel": "chrome", "moreCloseurl": "chrome://newtab/", "whitelist": [] }, { "action": "G_reclosedtab", "direct": "LU", "moreDes": "Reopen closed tab", "morePinned": "unpinned", "morePosition": "chrome", "moreTarget": "newfront", "whitelist": [] }, { "action": "G_reload", "direct": "UD", "whitelist": [] }, { "action": "G_reloadclear", "direct": "UDU", "whitelist": [] }, { "action": "G_lefttab", "direct": "UL", "whitelist": [] }, { "action": "G_goparent", "direct": "ULU", "whitelist": [] }, { "action": "G_copytab", "direct": "DUR", "whitelist": [] }, { "action": "G_tostop", "direct": "RLR", "whitelist": [] }, { "action": "G_newtab", "direct": "DU", "moreDes": "New tab", "morePinned": "unpinned", "morePosition": "chrome", "moreTarget": "newfront", "whitelist": [] }, { "action": "G_righttab", "direct": "UR", "whitelist": [] } ], "gestureui": true, "gholdkey": "ctrl", "gholdkeydisable": "alt", "gholdkeytype": "enable", "stenable": false, "stroke": true, "strokecolor": "4E1485", "strokeopa": 0.8, "strokewidth": 5, "tooltip": true, "tooltipcolor": "120310", "tooltipopa": 0.9, "tooltipwidth": 18 }, "isGesturesOff": false, "normal": { "autocancel": false, "autocancelvalue": 2, "cancelcontextmenu": true, "capturetype": "jpeg", "clickedOptin": true, "cursorimg": null, "cursorimgscale": 1, "dbclicktime": 600, "drag": true, "gesture": true, "hidetrash": false, "jpegquality": 100, "lasttab": false, "minilength": 10, "newtabposition": "chrome", "scroll": false, "scrolleffects": true, "scrollgesture": false, "strokegesture": false }, "optedout": true, "others": { "tuilink": false }, "scroll": { "scrollaccele": 1, "scrollspeed": 3, "smooth": true }, "scrollgesture": { "fastSwitch": false, "reverseFS": false, "sgsleft": [ { "action": "G_top" }, { "action": "G_bottom" } ], "sgsleftenable": true, "sgsright": [ { "action": "G_top" }, { "action": "G_bottom" } ], "sgsrightenable": false, "tablist": true, "tablistVisual": true, "tablistkey": "right" }, "strokegesture": { "strleft": [ { "action": "G_none" }, { "action": "G_righttab" } ], "strleftenable": true, "strmiddle": [ { "action": "G_lefttab" }, { "action": "G_righttab" } ], "strmiddleenable": false, "strpress": "up", "strright": [ { "action": "G_lefttab" }, { "action": "G_none" } ], "strrightenable": true }, "sync": true } ====== OLD Google Chrome gestures ====== The [[https://chrome.google.com/webstore/detail/jpkfjicglakibpenojifdiepckckakgk|Gestures for Chrome]] extension is designed to add mouse gesture support to Google Chrome. It's not well documented yet, but I put something on the previously blank [[https://bitbucket.org/os0x/chromegestures/wiki/Home|dev wiki]]. I'll replicate that content here so I have it. By the way, my config is [[http://pastebin.com/CEfWHCP9|here]]. ===== Adding a custom gesture ===== You can add gestures that run arbitrary javascript by selecting the "Run script ..." option. This lets you do just about anything you can script! Developing the script is fairly straightforward. You can write your script in a text editor and copy/paste into the script box, and it will remove the newlines automatically. Then click out of the text box, switch tab to a test page, reload, and try your new gesture out. To debug it, use the Javascript console with **console.log()**. To receive information about how and where your gesture was activated, use the **arg** parameter that your script is automatically passed. This parameter has four key members: * **arg.action**: Information about the action you scripted, including script name. * **arg.config**: Configuration of the Chrome Gesture extension itself * **arg.event**: The last MouseEvent that triggered this event. * **arg.key**: The gesture sequence written as a string, e.g. "LRDU". The arg.event is useful for finding find what you gestured over, because it includes the **srcElement** member. Therefore, the tag the gesture was run over is **arg.event.srcElement**. As an example, the following gesture will zoom in on an image: var factor = Math.sqrt(2); var grow = function(img){x=img.width; y=img.height; img.width = x*factor; img.height = y*factor; }; var e = arg.event.srcElement; grow(e); var a = e.getElementsByTagName("img"); for (var i=0; i < a.length; i++) { grow(a[i]); } Of course, your usual globals like **window** and **document** are also available, as shown in this "view source" gesture code: window.open("view-source:" + document.URL,"_blank");