Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System notice on Win! #30

Closed
famewolf opened this issue Mar 16, 2019 · 5 comments
Closed

System notice on Win! #30

famewolf opened this issue Mar 16, 2019 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@famewolf
Copy link

In the same way the user is notified for capcha's notify the user if they should WIN a sweepstake.

@jpchip
Copy link
Owner

jpchip commented Mar 16, 2019

That would be great. Unfortunately I actually have no idea what happens when you win! I've never won myself, and I haven't been able to find a screenshot of it. Do you know what it looks like?

@famewolf
Copy link
Author

I haven't a clue..haven't won either and am spending way to much time having to enter capcha's. I do know that most of the sweeps will say "User, you did not win" or something similar so perhaps looking for the absence of that?

@jpchip jpchip self-assigned this Mar 27, 2019
@jpchip jpchip added the enhancement New feature or request label Mar 27, 2019
@jpchip jpchip mentioned this issue Mar 27, 2019
@jpchip jpchip closed this as completed Mar 27, 2019
@famewolf
Copy link
Author

famewolf commented Mar 27, 2019

Ryan Montgomery's userscript shows when a user wins so I'd assume his code would show you what to check for? (the other giveaway grabber I mentioned previously)

This is what I found:

// check page until results show up then continue to next giveaway in queue if not a winner
function handleSubmit(){
let emailed = false
setInterval(() => {
if(document.getElementById('title')){
if(document.getElementById('title').innerHTML.includes('won')){
// setInterval( () => GM_notification("You just won an Amazon giveaway!", "Amazon Giveway Automator"), 5000)
if(!emailed){
emailed = true
GM_xmlhttpRequest({
method: "POST",
url: "http://email-sender-213012.appspot.com/hello",
data: email=${GM_getValue("userEmail")}&href=${window.location.href},
headers: {
"Content-Type": "application/x-www-form-urlencoded"
},
});
}
document.getElementById('lu_co_ship_box-announce').click()
processGiveaways()
return
} else {
processGiveaways()
return
}
return
}
}, 1000)
}

@jpchip
Copy link
Owner

jpchip commented Mar 27, 2019

Hey @famewolf, Check out the comments on #32. The person on that ticket was kind enough to provide code and fill me in on what happens when you win. I added code to handle that case, and deliver a notification on win. That's why I closed this ticket.

@famewolf
Copy link
Author

Thank you! I was afraid it got closed due to lack of information. Great work! I will mention I do not believe the system notifications work under linux...at least nothing is popping up for me when capcha's show up...I'll eventually notice it paused and enter one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants