Created
August 21, 2020 12:29
-
-
Save iamaravi/d3cd11b4c35c7911a89fca63e219bfa0 to your computer and use it in GitHub Desktop.
Script to select all free channels in Airtel DTH Alacarte plan
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
var selectedChannels = 0; | |
jQuery(".icon-outlined-plus").click(); | |
jQuery("a.btn-circle.cursor-pointer.btn-sm").each(function(){ | |
var amount = jQuery(this).text(); | |
amount = amount.replace("Rs","").replace("/1","").replace("mo",""); | |
amount = parseInt(amount); | |
if(amount === 0) { | |
angular.element(jQuery(this).closest('div').find('[type=checkbox]')).triggerHandler('click'); | |
selectedChannels++; | |
} | |
}) | |
console.log("Selected Channels Total: " + selectedChannels ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment