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 characters
import ts from "typescript"; | |
import fs from "node:fs"; | |
import path from "node:path"; | |
import { fileURLToPath } from "node:url"; | |
const SKIP_THIRD_PARTY_MODULES = true; | |
const __dirname = path.dirname(fileURLToPath(import.meta.url)); | |
/** | |
* Get the module path based on the base directory. |
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 characters
// ==UserScript== | |
// @name GitHub open npm from import | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1.1 | |
// @description Opens the npm package by Ctrl/Cmd+click on import statement | |
// @author Kiliman | |
// @match https://github.com/* | |
// @icon https://www.google.com/s2/favicons?domain=github.com | |
// @grant none | |
// ==/UserScript== |
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 characters
// ==UserScript== | |
// @name GitHub open npm from import | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1.1 | |
// @description Opens the npm package by Ctrl/Cmd+click on import statement | |
// @author Kiliman | |
// @match https://github.com/* | |
// @icon https://www.google.com/s2/favicons?domain=github.com | |
// @grant none | |
// ==/UserScript== |
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 characters
//detecting tab key press | |
document.body.addEventListener('keydown', function detector (e) { | |
var keyCode = e.keyCode || e.which; | |
if(keyCode == 9) { | |
console.log( 'Tab detected' ); | |
document.documentElement.className += ' is-keyboarduser'; | |
document.body.removeEventListener('keydown', detector); |