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
| // get poke buttons, including suggested pokes | |
| var pokeButtons = document.querySelectorAll(".mls a._4jy0"); | |
| // exclude suggested pokes | |
| var pokeBacks = []; | |
| for(i=0;i<pokeButtons.length;i++){ | |
| if(pokeButtons[i].parentNode.parentNode.parentNode.parentNode.innerHTML.indexOf("Suggested Poke") == -1){ | |
| pokeBacks.push(pokeButtons[i]) | |
| } | |
| } | |
| // click all poke buttons |
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
| jQuery(function($) { | |
| $('form[data-async]').live('submit', function(event) { | |
| var $form = $(this); | |
| var $target = $($form.attr('data-target')); | |
| $.ajax({ | |
| type: $form.attr('method'), | |
| url: $form.attr('action'), | |
| data: $form.serialize(), |