canvas navigator

navigate left and right using arrow keys in canvas

04.12.2022 itibariyledir. En son verisyonu görün.

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği yüklemek için Tampermonkey gibi bir uzantı yüklemeniz gerekir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği indirebilmeniz için ayrıca Tampermonkey gibi bir eklenti kurmanız gerekmektedir.

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

Bu stili yüklemek için Stylus gibi bir uzantı yüklemeniz gerekir.

Bu stili yüklemek için Stylus gibi bir uzantı kurmanız gerekir.

Bu stili yükleyebilmek için Stylus gibi bir uzantı yüklemeniz gerekir.

Bu stili yüklemek için bir kullanıcı stili yöneticisi uzantısı yüklemeniz gerekir.

Bu stili yüklemek için bir kullanıcı stili yöneticisi uzantısı kurmanız gerekir.

Bu stili yükleyebilmek için bir kullanıcı stili yöneticisi uzantısı yüklemeniz gerekir.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name         canvas navigator
// @namespace    http://tampermonkey.net/
// @version      0.2
// @description  navigate left and right using arrow keys in canvas
// @author       icycoldveins
// @icon         none
// @grant        none
// @license     MIT
// @match      *://*.instructure.com/*
// ==/UserScript==
(function () {
  "use strict";

  // detect if text has Previos  or Next
  // if yes, click it
  // if no, do nothing
  //using left and right arrow keys
  //   aria-label="Previous Module Item"
  document.addEventListener("keydown", function (event) {
    if (event.key == "ArrowLeft") {
      if (document.querySelector("[aria-label='Previous Module Item']")) {
        document.querySelector("[aria-label='Previous Module Item']").click();
        // Previous Module Item - opens in new window

      }else if(document.querySelector("[aria-label='Previous Module Item - opens in new window']"))
      {
        document.querySelector("[aria-label='Previous Module Item - opens in new window']").click();
      }
    }
    if (event.key == "ArrowRight") {
      if (document.querySelector("[aria-label='Next Module Item']")) {
        document.querySelector("[aria-label='Next Module Item']").click();
      }
      else if(document.querySelector("[aria-label='Next Module Item - opens in new window']"))
      {
        document.querySelector("[aria-label='Next Module Item - opens in new window']").click();
      }
    }
    if (event.key == "s" && event.metaKey && event.shiftKey) {
      // download the file
      document.querySelector("[download='true']").click();
    }
  });
})();