Created
April 30, 2018 19:52
-
-
Save cuylerstuwe/812d6e07dd49a6c695e490dce48deba4 to your computer and use it in GitHub Desktop.
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
| // ==UserScript== | |
| // @name Jump to Queue After Boot Out | |
| // @namespace salembeats | |
| // @version 1 | |
| // @description Back to Queue after boot-out. | |
| // @author You | |
| // @include https://worker.mturk.com/ | |
| // @include https://worker.mturk.com/projects | |
| // @grant none | |
| // ==/UserScript== | |
| let reactAlertElement = document.querySelector(`div[data-react-class="require('reactComponents/alert/Alert')['PureAlert']"]`); | |
| if(reactAlertElement) { | |
| let reactAlert = JSON.parse(reactAlertElement.dataset.reactProps); | |
| if(reactAlert.header.toLowerCase().includes("hit submitted")) { | |
| window.location.href = "http://worker.mturk.com/tasks"; | |
| } | |
| else if(reactAlert.header.toLowerCase().includes("hit submitted")) { | |
| window.location.href = "http://worker.mturk.com/tasks"; | |
| } | |
| else if(reactAlert.header.toLowerCase().includes("there are no more of these hits available")) { | |
| window.location.href = "http://worker.mturk.com/tasks"; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment