Skip to content

Instantly share code, notes, and snippets.

@foreversmart
Created June 15, 2020 10:02
Show Gist options
  • Save foreversmart/8c9e89502adcdddb0197e2dc42fc5931 to your computer and use it in GitHub Desktop.
Save foreversmart/8c9e89502adcdddb0197e2dc42fc5931 to your computer and use it in GitHub Desktop.
// 用法 console 打下面两行 // 可以 https://www.arealme.com/colors/zh/ 网站的颜色识别中作弊,自动点击不一样的颜色块
// 用法 console 打下面两行
// 可以 https://www.arealme.com/colors/zh/ 网站的颜色识别中作弊,自动点击不一样的颜色块
f = function(){
a = document.getElementById("box")
c = ""
cc = 0
d = ""
dc = 0
a.childNodes.forEach(function(s){
if (c=="") {
c = s.style.backgroundColor
}
if (c != s.style.backgroundColor) {
d = s.style.backgroundColor
dc++
return
}
cc++
})
console.log(c, cc)
console.log(d, dc)
if (dc == 1) {
c = d
}
a.childNodes.forEach(function(s){
if (c == s.style.backgroundColor) {
s.style.backgroundColor = "#FFF"
s.click()
}
})
}
setInterval(f, 10)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment