Last active
November 21, 2023 07:18
-
-
Save Zyst/3f58009943653e7873d30f1c748cf9ce to your computer and use it in GitHub Desktop.
Revisions
-
Zyst revised this gist
Mar 15, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -33,7 +33,7 @@ const loopToFindKeyboard = () => { const kb = document.querySelector("main > div > div > svg"); if (document.title === "Typing Practice" && kb) return remapKeys(); setTimeout(loopToFindKeyboard, 500); }; -
Zyst revised this gist
Mar 15, 2022 . 1 changed file with 10 additions and 9 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,12 +1,13 @@ // ==UserScript== // @name KeyBR Colemak-DH // @namespace http://tampermonkey.net/ // @version v1.1 // @description Switch Colemak layout in keybr.com to Colemak DH // @author https://github.com/Zyst // @match https://www.keybr.com/ // @icon https://www.google.com/s2/favicons?domain=keybr.com // @grant none // @contributors https://github.com/hilarycheng // ==/UserScript== (() => { @@ -31,7 +32,7 @@ }; const loopToFindKeyboard = () => { const kb = document.querySelector("main > div > div > svg"); if (kb) return remapKeys(); setTimeout(loopToFindKeyboard, 500); }; -
Zyst revised this gist
Dec 27, 2021 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ // ==UserScript== // @name KeyBR Colemak-DH // @namespace http://tampermonkey.net/ // @version v1.1 // @description Switch Colemak layout in keybr.com to Colemak DH // @author https://github.com/Zyst // @match https://www.keybr.com/ -
Zyst revised this gist
Dec 27, 2021 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ // ==UserScript== // @name KeyBR Colemak-DH // @namespace http://tampermonkey.net/ // @version v1.2 // @description Switch Colemak layout in keybr.com to Colemak DH // @author https://github.com/Zyst // @match https://www.keybr.com/ @@ -31,7 +31,7 @@ }; const loopToFindKeyboard = () => { const kb = document.querySelector("main#App > div > div > div > svg"); if (kb) return remapKeys(); setTimeout(loopToFindKeyboard, 500); }; -
Zyst revised this gist
Nov 6, 2021 . 1 changed file with 25 additions and 21 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,27 +10,31 @@ // ==/UserScript== (() => { "use strict"; const KEYS_TO_REMAP = [ { from: "T", to: "B" }, { from: "G", to: "G" }, { from: "H", to: "M" }, { from: "Z", to: "X" }, { from: "X", to: "C" }, { from: "C", to: "D" }, { from: "B", to: "Z" }, { from: "M", to: "H" }, ]; const remapKey = ({ from, to }) => { document.querySelector(`svg[data-key='Key${from}'] > text`).innerHTML = to; }; const remapKeys = () => { KEYS_TO_REMAP.forEach(remapKey); }; const loopToFindKeyboard = () => { const kb = document.querySelector("svg.Keyboard.Keyboard--full"); if (kb) return remapKeys(); setTimeout(loopToFindKeyboard, 500); }; loopToFindKeyboard(); })(); -
Zyst revised this gist
Nov 6, 2021 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,7 +3,7 @@ // @namespace http://tampermonkey.net/ // @version final // @description Switch Colemak layout in keybr.com to Colemak DH // @author https://github.com/Zyst // @match https://www.keybr.com/ // @icon https://www.google.com/s2/favicons?domain=keybr.com // @grant none -
Zyst revised this gist
Nov 6, 2021 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -27,7 +27,6 @@ } const loopToFindKeyboard = () => { const kb = document.querySelector("svg.Keyboard.Keyboard--full") if (kb) return remapKeys() setTimeout(loopToFindKeyboard, 500) -
Zyst created this gist
Nov 6, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,37 @@ // ==UserScript== // @name KeyBR Colemak-DH // @namespace http://tampermonkey.net/ // @version final // @description Switch Colemak layout in keybr.com to Colemak DH // @author You // @match https://www.keybr.com/ // @icon https://www.google.com/s2/favicons?domain=keybr.com // @grant none // ==/UserScript== (() => { 'use strict'; const remapKey = (originalKey, newValue) => { document.querySelector(`svg[data-key='Key${originalKey}'] > text`).innerHTML = newValue; } const remapKeys = () => { remapKey('T', 'B') remapKey('G', 'G') remapKey('H', 'M') remapKey('Z', 'X') remapKey('X', 'C') remapKey('C', 'D') remapKey('B', 'Z') remapKey('M', 'H') } const loopToFindKeyboard = () => { console.log('loooooping') const kb = document.querySelector("svg.Keyboard.Keyboard--full") if (kb) return remapKeys() setTimeout(loopToFindKeyboard, 500) } loopToFindKeyboard() })();