Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
!function() {
// Don't forget to scroll all the way down to load all replies!
const elems = document.body.querySelectorAll(
'div.original-permalink-page ' +
'li.ThreadedConversation:not(.ThreadedConversation--selfThread),' +
'li.ThreadedConversation--loneTweet');
for (const elem of elems) {
elem.style.border = '2px solid green';
elem.style['transition'] = 'border 1s';
}
const index = Math.floor(Math.random() * elems.length);
const styles = [
'4px solid red',
'4px solid yellow',
];
let iteration = 0;
function swap() {
elems[index].style.border = styles[iteration];
iteration = (iteration + 1) % styles.length;
setTimeout(swap, 500);
}
swap();
}();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.