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
// based on MDN's generator example | |
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function* | |
function* incNumbers(): Generator<number, never, number> { | |
let index = 0; | |
while (true) { | |
yield index++; | |
} | |
} |
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
javascript: (function () { | |
const url = new URL(location.href); | |
if (url.searchParams.has('authuser')) { | |
return; | |
} | |
url.searchParams.append('authuser', '1'); | |
location.replace(url.toString()); | |
})(); |
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
{ | |
"Print to console": { | |
"prefix": "logvar", | |
"body": [ | |
"console.log('Filename: ${TM_FILENAME} Line: ${TM_LINE_NUMBER}', $1)" | |
], | |
"description": "Log variable to console" | |
}, | |
"JSON Print to console": { |