User Tools

Site Tools


google_chrome_gestures

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
google_chrome_gestures [2012/05/21 16:44] tkbletscgoogle_chrome_gestures [2012/05/21 22:31] tkbletsc
Line 1: Line 1:
 ====== Google Chrome gestures ====== ====== 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]].
-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. +
 ===== Adding a custom gesture ===== ===== Adding a custom gesture =====
  
Line 23: Line 21:
  
 <code=javascript> <code=javascript>
- 
 var factor = Math.sqrt(2); var factor = Math.sqrt(2);
-var grow = function(img){img.width *= factor; img.height *= factor; };+var grow = function(img){x=img.width; y=img.height; img.width = x*factor; img.height = y*factor; };
 var e = arg.event.srcElement; var e = arg.event.srcElement;
 grow(e); grow(e);
Line 32: Line 29:
  grow(a[i]);  grow(a[i]);
 } }
 +</code>
  
 +Of course, your usual globals like **window** and **document** are also available, as shown in this "view source" gesture code:
 +
 +<code=javascript>
 +window.open("view-source:" + document.URL,"_blank");
 </code> </code>
google_chrome_gestures.txt · Last modified: 2020/08/08 10:39 by tkbletsc

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki