aaronmaynard/Karmalicity-Assistant

Stop Chrome Extension when boolean = true

Closed this issue · 0 comments

We have a function that checks the page and sees if we have reached the daily limit of listings we can run.

if (str.includes("You've completed 60 out of 60 possible actions so far today.")) {
        // Daily limit reached
        dLR = true;
}else{
	// Daily limit not yet reached
	dLR - false;
}

Right now this is an unused variable. Once we hit this limit, the extension should send an alert and disable itself somehow. Can be done by closing the webpage after the alert() has been clicked, or if you prefer another method you may try that. This will need to be implemented around 210.

else if(title.includes("listing")){
	// Check if the daily limit has been reached
	checkDailyLimit();
	if(dLR){
		// Disable the extension
		alert("You have reached your limit for Daily Actions!");
                // Implement a method of turning off or disabling the extension
	}else{
		/*
		Extension runs as normal
		*/
	}
}