Fix crowd contribute not working on al.ly

This commit is contained in:
ikancupang 2019-12-21 18:13:02 +07:00 committed by GitHub
parent 4605c466d6
commit 645e6cd1a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1428,20 +1428,6 @@ ensureDomLoaded(()=>{
{
const regex=/var count = [0-9]*;var countdown = setInterval\(function\(\){\$\("[a-z\-.# ]+"\)(\.attr\("href","#pleasewait"\))?(\.attr\("disabled",""\))?\.html\(count( \+ ".+")?\);if \(count < 1\) {clearInterval\(countdown\);(\$\("[a-z\-.# ]+"\)\.attr\("href",|window\.location=)"(https?:\/\/[^"]+)"( \+ hash)?\)?(\.removeAttr\("disabled"\)\.removeClass\("disabled"\))?(\.html\(".+"\))?;}count--;}, 1000\);/
let contribute=false
document.querySelectorAll("script").forEach(script=>{
let matches=regex.exec(script.textContent)
if(matches&&matches[5])
{
if(contribute)
{
contributeAndNavigate(matches[5])
}
else
{
safelyNavigate(matches[5])
}
}
})
if(!bypassed)
{
domainBypass(/al\.ly|ally\.sh|dausel\.co/,()=>{
@ -1459,6 +1445,20 @@ ensureDomLoaded(()=>{
}
})
}
document.querySelectorAll("script").forEach(script=>{
let matches=regex.exec(script.textContent)
if(matches&&matches[5])
{
if(contribute)
{
contributeAndNavigate(matches[5])
}
else
{
safelyNavigate(matches[5])
}
}
})
clearInterval(dT)
}
},100)