Created
December 4, 2020 06:00
-
-
Save thunderrun/b7a3c5097b8dd35a9fbda5eca70607dc to your computer and use it in GitHub Desktop.
删除QQ空间所有相册
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
const iframe = document.querySelector('iframe[id="tphoto"]').contentWindow; | |
const expands = iframe.document.querySelectorAll('.js-album-op-tip'); | |
expands.forEach((node) => { | |
node.click(); | |
}); | |
const elements = iframe.document.querySelectorAll('.js-album-delete'); | |
let index = 0; | |
const total = elements.length; | |
const interval = setInterval(() => { | |
elements[index].click(); | |
if (index === total) { | |
clearInterval(interval); | |
} | |
setTimeout(() => { | |
const iframe2 = document.querySelector('iframe[id="share_photo"]').contentWindow; | |
const confirm = iframe2.document.querySelector('.bt_tip_hit'); | |
confirm.click(); | |
}, 1000); | |
index += 1; | |
}, 2000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment