]> us-delaporte.pagekite.me Git - dotfiles.git/blobdiff - doc/shortcuts.md
Merge branch 'main' of github.com:edthedev/dotfiles into main
[dotfiles.git] / doc / shortcuts.md
index 1aa87d9a1bc3b387a1cb4e8de2865aad468f12f7..3db236026dbd434a18983359a65affc9d4e5e2b0 100644 (file)
@@ -28,7 +28,6 @@ I have a bit of JavaScript in the HTML file I use for my homepage. It causes the
 
 ```html
 <!-- Script to jump to links on keypresses 1 through 6 -->
-<script src="./jquery-3.7.0.min.js"></script>
 <script>
        watch_keys = ['1','2','3','4','5','6'];
        locations = [
@@ -39,13 +38,13 @@ I have a bit of JavaScript in the HTML file I use for my homepage. It causes the
                'link here...',
                'link here...',
        ];
-  $(document).on("keyup", function (e) {
+  document.onkeypress = function (e) {
     if(e.key in watch_keys)
-               window.location = locations[parseInt(e.key)-1]
+      window.location = locations[parseInt(e.key)-1]
     else {
       console.log(e);
     }
-});
+  }
 </script>
 ```