Skip to content

Instantly share code, notes, and snippets.

@cqsd
Created June 30, 2020 10:08
Show Gist options
  • Save cqsd/a4a11ca87733408d041acb85c66be601 to your computer and use it in GitHub Desktop.
Save cqsd/a4a11ca87733408d041acb85c66be601 to your computer and use it in GitHub Desktop.
bookmarklets
(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';
};
})();
(() => {
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