您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
try to take over the world!
// ==UserScript== // @name PianoMarvelShorcut // @namespace http://tampermonkey.net/ // @version 0.11 // @description try to take over the world! // @author You // @match https://pianomarvel.com/* // @grant none // ==/UserScript== (function() { 'use strict'; // Your code here... //Shorcut keys for Tao Bien Lai handler function tao_bien_lai(e) { //Check if shorcut is pressed try { if (e.ctrlKey && e.keyCode == 219 || e.keyCode == 219) { //Click the element Ctrl + [ console.log('Previous Excercise') document.getElementsByClassName("fa fa-backward fa-2x mt-4")[0].click() } //Ctrl + ] if (e.ctrlKey && e.keyCode == 221 || e.keyCode == 221) { console.log('Next Excercise') document.getElementsByClassName("fa fa-forward fa-2x mt-4")[0].click() } } catch (error) { console.log('Có lỗi xảy ra: ' + error.message) } } // register the handler document.addEventListener('keyup', tao_bien_lai, false); })();