Created
July 12, 2024 17:12
-
-
Save mayank99/9cbe28319f0f05190f2e52dbbd6073d2 to your computer and use it in GitHub Desktop.
A userscript that disables client-side navigation (turbolinks) on GitHub
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Github no-SPA | |
// @version 1.0 | |
// @description Disables client-side navigation (turbolinks) on GitHub. | |
// @match https://github.com/* | |
// @run-at document-end | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=github.com | |
// @grant none | |
// ==/UserScript== | |
document.body.dataset.turbo = 'false'; | |
[...document.querySelectorAll('a[data-turbo-frame]')].forEach(link => { | |
delete link.dataset.turboFrame; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment