mirror of
https://github.com/TheNetsky/Microsoft-Rewards-Script.git
synced 2026-01-18 05:53:57 +00:00
1.2.1
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
import * as fs from 'fs'
|
||||
import path from 'path'
|
||||
|
||||
export async function loadAccounts() {
|
||||
import { Account } from '../interface/Account'
|
||||
|
||||
export async function loadAccounts(): Promise<Account[]> {
|
||||
try {
|
||||
let file = 'accounts.json'
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ export async function getEdgeVersions() {
|
||||
|
||||
export function getSystemComponents(mobile: boolean): string {
|
||||
const osId: string = mobile ? 'Linux' : 'Windows NT 10.0'
|
||||
const uaPlatform: string = mobile ? 'Android 10' : 'Win64; x64'
|
||||
const uaPlatform: string = mobile ? 'Android 13' : 'Win64; x64'
|
||||
|
||||
if (mobile) {
|
||||
return `${uaPlatform}; ${osId}; K`
|
||||
@@ -90,7 +90,6 @@ export function getSystemComponents(mobile: boolean): string {
|
||||
return `${uaPlatform}; ${osId}`
|
||||
}
|
||||
|
||||
|
||||
export async function getAppComponents(mobile: boolean) {
|
||||
const versions = await getEdgeVersions()
|
||||
const edgeVersion = mobile ? versions.android : versions.windows as string
|
||||
|
||||
@@ -4,7 +4,7 @@ export async function wait(ms: number): Promise<void> {
|
||||
})
|
||||
}
|
||||
|
||||
export function getFormattedDate(ms = Date.now()) {
|
||||
export function getFormattedDate(ms = Date.now()): string {
|
||||
const today = new Date(ms)
|
||||
const month = String(today.getMonth() + 1).padStart(2, '0') // January is 0
|
||||
const day = String(today.getDate()).padStart(2, '0')
|
||||
@@ -21,7 +21,7 @@ export function shuffleArray<T>(array: T[]): T[] {
|
||||
return shuffledArray
|
||||
}
|
||||
|
||||
export function randomNumber(min: number, max: number) {
|
||||
export function randomNumber(min: number, max: number): number {
|
||||
return Math.floor(Math.random() * (max - min + 1)) + min
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user