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
// quick & dirty blizzard websites sniffer. | |
// It loads given url, finds all image links on it and tries to | |
// look at those locations for list of possible filenames we're guessing | |
// are out there somewhere | |
var https = require('https') | |
// helper functions and constants | |
function uniq(array) { | |
return Array.from(new Set(array)) |
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
/* eslint-disable react-hooks/exhaustive-deps */ | |
/* eslint-disable @typescript-eslint/no-empty-function */ | |
import { useCallback, useEffect, useRef, useState } from 'react' | |
const touchDragTimeout = 500 | |
const touchDragScrollThreshold = 20 | |
const isOutsideThreshold = (a: number, b: number) => Math.abs(a - b) > touchDragScrollThreshold | |
import { createContext, useContext } from 'react' |