Skip to content

Instantly share code, notes, and snippets.

@davestewart
Last active February 9, 2023 07:43
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save davestewart/5a3dd95b51a7a03cf264c59d5795a930 to your computer and use it in GitHub Desktop.
Save davestewart/5a3dd95b51a7a03cf264c59d5795a930 to your computer and use it in GitHub Desktop.
/**
* INSTRUCTIONS
*
* Video at: https://youtube.com/watch?v=AzSDmfDDijQ
*
* 1. copy the code below into a bookmark
* 2. go to https://www.facebook.com/stories/
* 3. click on a story
* 4. hit pause on one you like
* 5. find and run your bookmark
*
* Enjoy the crazy 🤪
*/
javascript: var selector = '._iuw';var icons = Array.from(document.querySelectorAll(selector));var parent = icons[0].parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode;var h = document.body.clientHeight;var move = (child) => { var container = child.parentNode.parentNode; var sprite = child.firstChild;; var bounds = container.getBoundingClientRect(); var offset = -bounds.left + 50; child.style.position = 'fixed'; child.style.left = `${offset}px`; child.style.bottom = '20px'; sprite.style.left = `${Math.random() * 100}vw`; sprite.style.bottom = `${Math.random() * 70}vh`;};var click = () => { icons.sort(() => Math.random() > .5 ? 1 : -2)[0].click(); setTimeout(() => move(parent.lastChild), 0);};var next = () => setTimeout(() => { click(); next() }, 10);next();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment