Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name The Motte show context
- // @description Show hidden comments when needed for context
- // @match *://www.themotte.org/post/*
- // ==/UserScript==
- window.onload = () => {
- let context = document.getElementsByClassName('context')[0];
- if (!context) return;
- context = context.parentElement.parentElement;
- while (context.classList.contains('comment')) {
- context.classList.remove('collapsed');
- context = context.parentElement.parentElement.parentElement;
- }
- location.hash = '';
- setTimeout(() => { location.hash = '#context'; }, 0);
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement