Skip to content

Instantly share code, notes, and snippets.

@mayank99
Created July 12, 2024 17:12
Show Gist options
  • Save mayank99/9cbe28319f0f05190f2e52dbbd6073d2 to your computer and use it in GitHub Desktop.
Save mayank99/9cbe28319f0f05190f2e52dbbd6073d2 to your computer and use it in GitHub Desktop.
A userscript that disables client-side navigation (turbolinks) on GitHub
// ==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