Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Make sure the page is not in a frame
- if(window.self !== window.top) return;
- // short function to make code look cleaner
- function search(a) {
- 'use strict';
- return document.body.textContent.search(a) !== -1;
- }
- // main script body
- function main() {
- 'use strict';
- var i, boltstrike;
- if (search(/error/i)) {
- if (search('Submit')) {
- if (search('You have entered the correct code')) {
- location.href = "/battle.php?opp=Swimmer%20Richard";
- }
- if (location.pathname === "/battle.php") {
- if (search('.')) {
- location.href = "/battle.php?opp=Swimmer%20Richard";
- }
- boltstrike = document.evaluate('//input[@type="button" and contains(., "Bolt Strike")]', document, null, 9, null).singleNodeValue;
- if(boltstrike) {
- boltstrike.click();
- }
- }
- } else {
- alert("Captcha");
- }
- } else {
- location.href = "/battle.php?opp=Swimmer%20Richard";
- }
- }
- // run main() every 2 seconds
- setInterval(main, 2000);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement