Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name menu przez kb
- // @version 1.2
- // @include *hegira.com.pl/*
- // @copyright free
- // ==/UserScript==
- "use strict";
- const zakladki = [
- "Specjaliści",
- "Polityka",
- "Stocznia Orbitalna",
- "Sterowanie flotą",
- ];
- const klawisze = ["q", "w", "e", "r"];
- const menu = function (e) {
- const keyInd = klawisze.indexOf(e.key);
- if (keyInd !== -1) {
- window.location.href = $(`li:contains(${zakladki[keyInd]})`).children(
- "a"
- )[0].href;
- }
- };
- document.addEventListener("keyup", menu);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement