Created
June 30, 2020 10:08
-
-
Save cqsd/a4a11ca87733408d041acb85c66be601 to your computer and use it in GitHub Desktop.
bookmarklets
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
(function() { | |
const dbs = document.body.style; | |
dbs.color = '#eee'; | |
dbs.background = '#222'; | |
dbs.width = '800px'; | |
dbs.margin = '0 auto'; | |
console.log('it works fuck off'); | |
for (const d of document.getElementsByClassName('docinfo')) { | |
d.style.background = '#111'; | |
}; | |
for (const p of document.getElementsByTagName('pre')) { | |
p.style.fontFamily = 'Inconsolata, Fira Code, monospace'; | |
}; | |
for (const a of document.getElementsByTagName('a')) { | |
a.style.color = '#ffabab'; | |
}; | |
})(); |
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
(() => { | |
document.onscroll = (() => { | |
let totalUnliked = 0; | |
return async () => { | |
const tweets = document.querySelectorAll('[role="article"]'); | |
await tweets.forEach(async e => { | |
const likeButton = document.querySelector('[data-testid="unlike"]'); | |
if (typeof likeButton !== 'undefined' && likeButton) { | |
await likeButton.click(); | |
totalUnliked += 1; | |
console.log(totalUnliked); | |
} | |
}); | |
}; | |
})(); | |
setInterval(() => (window.scrollBy(0, 800)), 800); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment