Quick and dirty hack to verify a long list of devices in Riot's "Unknown Device" dialog.
This file contains 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 hack. USE AT YOUR OWN RISK. | |
*/ | |
function clickVerifyInDialog() { $('.mx_Dialog_primary').click() } | |
function verifyFirstKey() { $('.mx_UnknownDeviceDialog .mx_MemberDeviceInfo_verify').click() } | |
function hasKeyToVerify() { return $('.mx_UnknownDeviceDialog .mx_MemberDeviceInfo_verify') } | |
function verificationIsDisplayed() { | |
return $('#mx_BaseDialog_title').innerHTML == 'Verify device' | |
} | |
while (hasKeyToVerify()) { | |
verifyFirstKey() | |
if (verificationIsDisplayed()) { | |
clickVerifyInDialog() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment