Created
July 16, 2016 06:37
-
-
Save akhilrex/1b5e300541825b4a69a8d74dbafd8042 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
| //This is an improved version of https://gist.github.com/akhilrex/532991ac60d33deae4b61cfb137a3152 | |
| // A lot of users were complaining that the original script does not stop and keeps going on page after page. This could cause older | |
| //machines to get slow and incur a lot of data consumption. So the new script now has paging in it. | |
| //You see the window.pg variable at the top of the script. That is all you need to be concerned about. That is the number of pages the | |
| //script will now go through. Usage of the script is the same as of the original one. | |
| window.pg = 3; | |
| window.interval = window.setInterval(function() { | |
| $('.thing').each(function() { | |
| if (!$(this).hasClass('over18')) { | |
| $(this).remove(); | |
| } | |
| }); | |
| window.pg = window.pg - 1; | |
| if (window.pg <= 0) { | |
| window.clearInterval(window.interval); | |
| } else { | |
| $('div#progressIndicator').trigger("click"); | |
| } | |
| }, 3000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment