Skip to content

Instantly share code, notes, and snippets.

@hsuanxyz
Last active July 28, 2017 18:32
Show Gist options
  • Save hsuanxyz/373947db596727615364286170b0bbe7 to your computer and use it in GitHub Desktop.
Save hsuanxyz/373947db596727615364286170b0bbe7 to your computer and use it in GitHub Desktop.
全选 Chrome 60+ 浏览历史
/**
* @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