# Gestures

Swipe down from the top to show the address bar; swipe up to the top to hide the address bar. Swipe down to the bottom to hide the toolbar with option "swipe to hide tools"; swipe on the bottom corners to show the toolbar.

Swipe left/right near the toolbar to switch window; fling left/right to switch to the last/first window.

Swiping on the top part of content window (near the top address bar by default) triggers corresponding link in the file "default.gesture", which has the same format as default.link.

The algorithm to match swiping gesture to a line in the file "default.gesture" is as follows:

- Divide the screen width to three parts evenly, assign each part with a number 0, 1, 2 respectively.
- Assume "s" and "e" are the above defined numbers for the gesture start point and end point. Let "linenumber = 3*s+e" , if it is equal to 4 and the gesture's first direction is left, then change it to be 9.
- For turning back and forth, add "10" each time.

The final line number will match the corresponding line in "default.gesture", 0 to the first line, ...

"default.gesture2" is for the right side gesturs and the algorithm is similar to "default.gesture".

Example links:
Toggle fullscreen::0003
back:javascript:history.back()
forward:javascript:history.forward()
back2:javascript:history.go(-2)

Last Modified: 2 April 2024
add js function in README