Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
1.5 kB
2
Indexable
Never
// ==UserScript==
// @name         Scroll to Scanner
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @match        https://shishaheaven.weclapp.com/*
// @icon         data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    document.body.onkeyup = function(e) {


        //falls space
        if (e.key == " " ||
            e.code == "Space" ||
            e.keyCode == 32
  ) {
      document.getElementById("pageForm:shipmentTrackingId").scrollIntoView();
      document.getElementById("pageForm:shipmentTrackingId").focus();
  }
        //end space loop

        //falls rechts arrow
        if (
            e.keyCode == 39
        ) {
            //your code
            document.getElementsByClassName("w-icon  navigate_next").click();
            document.getElementById("pageForm:j_id338").trigger("click");

        }
        //end rechts arrow loop

}
    /*
    //Rechts Arrow
     document.body.onkeyup = function(e) {
  if (
      e.keyCode == 39
  ) {
    //your code
      document.getElementsByClassName('navigate_next').click();
  }
}

     //Left Arrow
     document.body.onkeyup = function(e) {
  if (
      e.keyCode == 37
  ) {
    //your code
      document.getElementsByClassName('navigate_before').click();
  }
}*/

    // Your code here...
})();