Skip to content

Instantly share code, notes, and snippets.

@iamaravi
Created August 21, 2020 12:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iamaravi/d3cd11b4c35c7911a89fca63e219bfa0 to your computer and use it in GitHub Desktop.
Save iamaravi/d3cd11b4c35c7911a89fca63e219bfa0 to your computer and use it in GitHub Desktop.
Script to select all free channels in Airtel DTH Alacarte plan
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