This file contains 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
// | |
// This scipts allows to import Egghead course as TODO to Habitica | |
// | |
// Step 1: Replace `apiKey` and `userId` with yours (check profile settings on Habitica) | |
// Step 2: Type resource name (egghead/vuemaster/frontendmaster/pluralsight/freecodecamp) in last line of the script | |
// Step 3: Open desired course in browser | |
// Step 4: Open DevTool and execute script in console | |
// Step 5: Check Habitica: new ToDo should be there :) | |
This file contains 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
// https://github.com/ChromeDevTools/devtools-frontend/blob/0dc36933e485a7009c380f41564848d70cafb429/front_end/models/text_utils/TextUtils.ts#L336 | |
export function isMinified(text) { | |
const kMaxNonMinifiedLength = 500; | |
let linesToCheck = 10; | |
let lastPosition = 0; | |
do { | |
let eolIndex = text.indexOf('\n', lastPosition); | |
if (eolIndex < 0) { | |
eolIndex = text.length; |
OlderNewer