Skip to content

Instantly share code, notes, and snippets.

@adryd325
Last active July 17, 2020 08:20
Show Gist options
  • Save adryd325/5292e2c71311fd5b7738bc75bab9f420 to your computer and use it in GitHub Desktop.
Save adryd325/5292e2c71311fd5b7738bc75bab9f420 to your computer and use it in GitHub Desktop.
<!-- You don't need this anymore -->
<!-- Paste this below the light/dark mode switcher in the account dropdown to enable new twitter layout -->
<li role="presentation">
<button type="button" class="dropdown-link enable-rweb-link" role="menuitem">Try the new Twitter</button>
</li>
<!-- Revised automatic version -->
<script>
let btn = document.createElement('span')
btn.innerHTML = '<li role="presentation"><button type="button" class="dropdown-link enable-rweb-link" role="menuitem">Test</button></li>'
document.getElementsByClassName('nightmode-toggle')[0].parentNode.appendChild(btn).firstChild.firstChild.click()
</script>
<!-- Smaller -->
<script>
let b=document.createElement("span");
b.innerHTML='<li><button class="enable-rweb-link"></button></li>',
document.getElementsByClassName("nightmode-toggle")[0].parentNode.appendChild(b).firstChild.firstChild.click();
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment