Last active
June 2, 2020 19:19
-
-
Save MrXyfir/18ec9a383cf8f07fb78cc5d1831319c7 to your computer and use it in GitHub Desktop.
Automatically expire all builds in TestFlight
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
// Quick and dirty script to expire all builds in TestFlight | |
// Selectors could probably be improved and simplified | |
// Working as of June 2nd 2020 | |
setInterval(() => { | |
const doneButton = document.querySelector("body > div.tb-modal.tb-default-theme.tb-modal--nofade.tb-modal--show.tb-modal--preshow > div.ng-isolate-scope.tb-modal__box > div > div:nth-child(2) > div.tb-modal__footer > div > button"); | |
if (doneButton) doneButton.click(); | |
const version = document.querySelector("#train\\.id > table > tbody > tr > td:nth-child(2) > a"); | |
if (version) version.click(); | |
const expireButton = document.querySelector("#main-ui-view > div.flexcol.ng-scope > div:nth-child(1) > ng-include > div > div.tf_wrapper.en-us > div.tf_body.ng-scope.ng-isolate-scope > div.ng-scope > section.section_header > div > div.tf-flexend > button"); | |
if (expireButton) expireButton.click(); | |
const confirmButton = document.querySelector("body > div.tb-modal.tb-default-theme.tb-modal--nofade.tb-modal--show.tb-modal--preshow > div.ng-isolate-scope.tb-modal__box > div > div:nth-child(1) > div.tb-modal__footer > div > button.ng-binding.tb-btn--primary"); | |
if (confirmButton) confirmButton.click(); | |
}, 500); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment