Last active
July 28, 2017 18:32
-
-
Save hsuanxyz/373947db596727615364286170b0bbe7 to your computer and use it in GitHub Desktop.
全选 Chrome 60+ 浏览历史
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
/** | |
* @version 0.0.1 | |
* @author HsuanLee | |
* @description 全选 Chrome 60+ 浏览历史 | |
* @tutorial | |
* //////////////////////////////// | |
* // // | |
* // 1. 访问 chrome://history // | |
* // 2. 粘贴到控制台运行 // | |
* // // | |
* //////////////////////////////// | |
*/ | |
javascript:(() => { | |
let items = document.querySelector('history-app') | |
.root | |
.querySelector('history-list') | |
.root .querySelector('iron-list') | |
.querySelectorAll('history-item'); | |
for (let item of items) { | |
let itemEle = item.root.querySelector('#checkbox'); | |
let checked = itemEle.getAttribute('aria-checked'); | |
if (checked !== 'true') { | |
itemEle.click(); | |
} | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment