mirror of
https://github.com/TheNetsky/Microsoft-Rewards-Script.git
synced 2026-01-11 10:56:17 +00:00
1.4.6
This commit is contained in:
@@ -52,6 +52,7 @@ Under development, however mainly for personal use!
|
|||||||
| workers.doPunchCards | Complete punchcards | `true` |
|
| workers.doPunchCards | Complete punchcards | `true` |
|
||||||
| workers.doDesktopSearch | Complete daily desktop searches | `true` |
|
| workers.doDesktopSearch | Complete daily desktop searches | `true` |
|
||||||
| workers.doMobileSearch | Complete daily mobile searches | `true` |
|
| workers.doMobileSearch | Complete daily mobile searches | `true` |
|
||||||
|
| globalTimeout | The length before the action gets timeout | 30 seconds (30.000 miliseconds) |
|
||||||
| searchSettings.useGeoLocaleQueries | Generate search queries based on your geo-location | `false` (Uses EN-US generated queries) |
|
| searchSettings.useGeoLocaleQueries | Generate search queries based on your geo-location | `false` (Uses EN-US generated queries) |
|
||||||
| scrollRandomResults | Scroll randomly in search results | `true` |
|
| scrollRandomResults | Scroll randomly in search results | `true` |
|
||||||
| searchSettings.clickRandomResults | Visit random website from search result| `true` |
|
| searchSettings.clickRandomResults | Visit random website from search result| `true` |
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "microsoft-rewards-script",
|
"name": "microsoft-rewards-script",
|
||||||
"version": "1.4.5",
|
"version": "1.4.6",
|
||||||
"description": "Automatically do tasks for Microsoft Rewards but in TS!",
|
"description": "Automatically do tasks for Microsoft Rewards but in TS!",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|||||||
@@ -43,6 +43,9 @@ class Browser {
|
|||||||
|
|
||||||
const context = await newInjectedContext(browser, { fingerprint: fingerpint })
|
const context = await newInjectedContext(browser, { fingerprint: fingerpint })
|
||||||
|
|
||||||
|
// Set timeout to preferred amount
|
||||||
|
context.setDefaultTimeout(this.bot.config?.globalTimeout ?? 30_000)
|
||||||
|
|
||||||
await context.addCookies(sessionData.cookies)
|
await context.addCookies(sessionData.cookies)
|
||||||
|
|
||||||
if (this.bot.config.saveFingerprint) {
|
if (this.bot.config.saveFingerprint) {
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
"doDesktopSearch": true,
|
"doDesktopSearch": true,
|
||||||
"doMobileSearch": true
|
"doMobileSearch": true
|
||||||
},
|
},
|
||||||
|
"globalTimeout": 30000,
|
||||||
"searchSettings": {
|
"searchSettings": {
|
||||||
"useGeoLocaleQueries": false,
|
"useGeoLocaleQueries": false,
|
||||||
"scrollRandomResults": true,
|
"scrollRandomResults": true,
|
||||||
@@ -26,4 +27,4 @@
|
|||||||
"enabled": false,
|
"enabled": false,
|
||||||
"url": ""
|
"url": ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -181,7 +181,8 @@ export class MicrosoftRewardsBot {
|
|||||||
await saveSessionData(this.config.sessionPath, browser, account.email, this.isMobile)
|
await saveSessionData(this.config.sessionPath, browser, account.email, this.isMobile)
|
||||||
|
|
||||||
// Close desktop browser
|
// Close desktop browser
|
||||||
return await this.closeBrowser(browser, account.email)
|
await this.closeBrowser(browser, account.email)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mobile
|
// Mobile
|
||||||
@@ -241,7 +242,8 @@ export class MicrosoftRewardsBot {
|
|||||||
log('MAIN-POINTS', `The script collected ${this.collectedPoints} points today`)
|
log('MAIN-POINTS', `The script collected ${this.collectedPoints} points today`)
|
||||||
|
|
||||||
// Close mobile browser
|
// Close mobile browser
|
||||||
return await this.closeBrowser(browser, account.email)
|
await this.closeBrowser(browser, account.email)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
private async closeBrowser(browser: BrowserContext, email: string) {
|
private async closeBrowser(browser: BrowserContext, email: string) {
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ export interface Config {
|
|||||||
runOnZeroPoints: boolean;
|
runOnZeroPoints: boolean;
|
||||||
clusters: number;
|
clusters: number;
|
||||||
workers: Workers;
|
workers: Workers;
|
||||||
|
globalTimeout: number;
|
||||||
searchSettings: SearchSettings;
|
searchSettings: SearchSettings;
|
||||||
webhook: Webhook;
|
webhook: Webhook;
|
||||||
saveFingerprint: boolean;
|
saveFingerprint: boolean;
|
||||||
|
|||||||
Reference in New Issue
Block a user