Created
April 2, 2017 04:16
-
-
Save dwelch2344/0eb85a8580c3a20e4efc2d520a38bfb6 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
$sel = $; | |
function deleteThem() { | |
var $injector = angular.injector(['ng']); | |
$injector.invoke(function($timeout) { | |
$sel('[aria-label^=" Incoming call from "][aria-label^=" Missed call from "],[aria-label^=" Outgoing call to "]').click(); | |
console.log('selected') | |
$timeout(() => { | |
$sel('[aria-label="More options"]').click(); | |
console.log('options') | |
}, .5 * 1000) | |
.then( () => { | |
return $timeout(() => { | |
$sel('[aria-label="Archive"][role="menuitem"]').click(); | |
console.log('archive') | |
}, 1 * 1000); | |
}) | |
.then( () => { | |
return $timeout(() => { | |
$sel('[aria-label="Calls"]').click(); | |
console.log('Calls') | |
}, 1 * 1000); | |
}) | |
.then( () => { | |
console.log('end') | |
var len = $sel('.md-virtual-repeat-offsetter').children.length | |
if( len > 0 ){ | |
return $timeout(() => { | |
console.log('Found', len, '- Restarting!') | |
deleteThem() | |
}, 1 * 1000); | |
} | |
}) | |
}); | |
} | |
deleteThem() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment