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
| let m=100,x=0; | |
| const sinterval = setInterval(() => { | |
| window.scrollBy(x,m); | |
| m+=m;x+=m; //increase window size after scroll | |
| }, 100); | |
| //clears Interval | |
| setTimeout(()=> clearInterval(sinterval),2000) |
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
| const { format, createLogger, transports } = require("winston"); | |
| const path=require('path'); | |
| const { combine, timestamp, label, printf } = format; | |
| const CATEGORY = "kingbotss"; | |
| //Using the printf format. | |
| const customFormat = printf(({ level, message, label, timestamp }) => { | |
| return `${timestamp} [${label}] ${level}: ${message}`; | |
| }); |
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
| const fs=require('fs'); | |
| function getChromeExe(chromeDirName) { | |
| if (process.platform !== 'win32') { | |
| return null; | |
| } | |
| var windowsChromeDirectory, i, prefix; | |
| var suffix = '\\Google\\'+ chromeDirName + '\\Application\\chrome.exe'; | |
| var prefixes = [process.env.LOCALAPPDATA, process.env.PROGRAMFILES, process.env['PROGRAMFILES(X86)']]; | |