Skip to content
This repository has been archived by the owner on Sep 15, 2022. It is now read-only.

Hand gesture Plugins | Scripts

hitesh saini edited this page Aug 14, 2020 · 1 revision

gesture Object is exposed in the apis which contain hand swipe direction or any error if occurs.

gesture has these properties:

{
    direction: 'up|down|Left|Right|Long Up|Long Down',
    error: 'if any'
} 

Code snippet will execute on every gesture recognition when current active tab is on this particular website.

if (!gesture.error) {
 if (gesture.direction === "up") {
   window.location.replace("https://facebook.com/logout.php");
 }
}

To load this plugin:-

Saving plugin. Plugin Save Screen

After saving plugin. after save plugin So this is the way to create a custom gesture handler for any website on this extension.

For tinder web:-

if (!gesture.error) {
  var el = null;
  if (gesture.direction === "Left") {
    el = document.querySelector('[aria-label="Nope"]');
    el.click();
  } else if (gesture.direction === "Right") {
    el = document.querySelector('[aria-label="Like"]');
    el.click();
  }
}