Last active
February 24, 2026 16:32
-
-
Save PedroHLC/f6f238834f5ebdfaff5c1bf907745fcb to your computer and use it in GitHub Desktop.
Revisions
-
PedroHLC revised this gist
Feb 24, 2026 . 1 changed file with 2 additions and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ // ==UserScript== // @name Disable Turbo on GitHub // @namespace https://gist.github.com/PedroHLC/f6f238834f5ebdfaff5c1bf907745fcb // @version 1.0.13 // @author PedroHLC, Claude // @description Completely disables Turbo Drive on GitHub // @match https://github.com/* @@ -12,12 +12,11 @@ // ==/UserScript== (function() { // Disable Turbo Drive when it initializes (but don't disconnect — breaks previews) Object.defineProperty(window, 'Turbo', { set(val) { if (val?.session) { val.session.drive = false; } this._Turbo = val; }, -
PedroHLC revised this gist
Feb 24, 2026 . 1 changed file with 5 additions and 6 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ // ==UserScript== // @name Disable Turbo on GitHub // @namespace https://gist.github.com/PedroHLC/f6f238834f5ebdfaff5c1bf907745fcb // @version 1.0.12 // @author PedroHLC, Claude // @description Completely disables Turbo Drive on GitHub // @match https://github.com/* @@ -43,13 +43,12 @@ e.preventDefault(); }); // Only disable the main navigation turbo-frame, leave others alone new MutationObserver(() => { document.querySelectorAll('[data-turbo-frame="repo-content-turbo-frame"]').forEach(el => { el.removeAttribute('data-turbo-frame'); }); const navFrame = document.getElementById('repo-content-turbo-frame'); if (navFrame) navFrame.setAttribute('disabled', ''); }).observe(document.documentElement, { childList: true, subtree: true }); })(); -
PedroHLC revised this gist
Feb 24, 2026 . No changes.There are no files selected for viewing
-
PedroHLC revised this gist
Feb 24, 2026 . 1 changed file with 24 additions and 88 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ // ==UserScript== // @name Disable Turbo on GitHub // @namespace https://gist.github.com/PedroHLC/f6f238834f5ebdfaff5c1bf907745fcb // @version 1.0.11 // @author PedroHLC, Claude // @description Completely disables Turbo Drive on GitHub // @match https://github.com/* @@ -12,108 +12,44 @@ // ==/UserScript== (function() { // Disable Turbo Drive when it initializes Object.defineProperty(window, 'Turbo', { set(val) { if (val?.session) { val.session.drive = false; val.session.disconnect(); } this._Turbo = val; }, get() { return this._Turbo; }, configurable: true }); // Make disable-turbo meta always report true when read const origGetAttribute = HTMLMetaElement.prototype.getAttribute; HTMLMetaElement.prototype.getAttribute = function(name) { if (name === 'content' && this.name === 'disable-turbo') return 'true'; return origGetAttribute.call(this, name); }; // Intercept Turbo Drive navigations document.addEventListener('turbo:before-visit', function(e) { e.preventDefault(); window.location.href = e.detail.url; }); // Kill prefetch document.addEventListener('turbo:before-prefetch', function(e) { e.preventDefault(); }); // Strip turbo-frame targeting so clicks become normal navigations new MutationObserver(() => { document.querySelectorAll('[data-turbo-frame]').forEach(el => { el.removeAttribute('data-turbo-frame'); }); document.querySelectorAll('turbo-frame').forEach(f => { f.setAttribute('disabled', ''); }); }).observe(document.documentElement, { childList: true, subtree: true }); })(); -
PedroHLC revised this gist
Feb 24, 2026 . 1 changed file with 24 additions and 8 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ // ==UserScript== // @name Disable Turbo on GitHub // @namespace https://gist.github.com/PedroHLC/f6f238834f5ebdfaff5c1bf907745fcb // @version 1.0.10 // @author PedroHLC, Claude // @description Completely disables Turbo Drive on GitHub // @match https://github.com/* @@ -91,13 +91,29 @@ configurable: true }); // Nuclear: make ANY meta[name=disable-turbo] always report "true" const origGetAttribute = HTMLMetaElement.prototype.getAttribute; HTMLMetaElement.prototype.getAttribute = function(name) { if (name === 'content' && this.name === 'disable-turbo') { return 'true'; } return origGetAttribute.call(this, name); }; // Also trap the .content property getter const contentDesc = Object.getOwnPropertyDescriptor(HTMLMetaElement.prototype, 'content') || Object.getOwnPropertyDescriptor(HTMLElement.prototype, 'content') || Object.getOwnPropertyDescriptor(Element.prototype, 'content'); if (contentDesc) { const origGetter = contentDesc.get; Object.defineProperty(HTMLMetaElement.prototype, 'content', { get() { if (this.name === 'disable-turbo') return 'true'; return origGetter.call(this); }, set: contentDesc.set, configurable: true }); } })(); -
PedroHLC revised this gist
Feb 24, 2026 . 1 changed file with 9 additions and 10 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ // ==UserScript== // @name Disable Turbo on GitHub // @namespace https://gist.github.com/PedroHLC/f6f238834f5ebdfaff5c1bf907745fcb // @version 1.0.9 // @author PedroHLC, Claude // @description Completely disables Turbo Drive on GitHub // @match https://github.com/* @@ -91,14 +91,13 @@ configurable: true }); // Intercept any lookup of disable-turbo so it always returns true const origQuerySelector = Document.prototype.querySelector; Document.prototype.querySelector = function(selector) { const result = origQuerySelector.call(this, selector); if (result?.tagName === 'META' && result?.name === 'disable-turbo') { result.content = 'true'; } return result; }; })(); -
PedroHLC revised this gist
Feb 24, 2026 . 1 changed file with 21 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ // ==UserScript== // @name Disable Turbo on GitHub // @namespace https://gist.github.com/PedroHLC/f6f238834f5ebdfaff5c1bf907745fcb // @version 1.0.8 // @author PedroHLC, Claude // @description Completely disables Turbo Drive on GitHub // @match https://github.com/* @@ -54,6 +54,26 @@ } }); // Intercepts renders document.addEventListener('turbo:before-render', function(e) { // Patch the incoming page before it gets rendered const newBody = e.detail.newBody; if (newBody) { newBody.querySelectorAll?.('meta[name="disable-turbo"]').forEach(m => { m.content = 'true'; }); } // Also patch the new head if available const newHead = e.detail.newHead; if (newHead) { newHead.querySelectorAll?.('meta[name="disable-turbo"]').forEach(m => { m.content = 'true'; }); } }); // Kill prefetch document.addEventListener('turbo:before-prefetch', function(e) { e.preventDefault(); -
PedroHLC revised this gist
Feb 24, 2026 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ // ==UserScript== // @name Disable Turbo on GitHub // @namespace https://gist.github.com/PedroHLC/f6f238834f5ebdfaff5c1bf907745fcb // @version 1.0.7 // @author PedroHLC, Claude // @description Completely disables Turbo Drive on GitHub // @match https://github.com/* @@ -22,7 +22,7 @@ meta2.name = 'turbo-visit-control'; meta2.content = 'reload'; // Insert meta tags into <head> once it exists new MutationObserver((_, obs) => { if (document.head) { document.head.prepend(meta2); -
PedroHLC revised this gist
Feb 24, 2026 . 1 changed file with 12 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ // ==UserScript== // @name Disable Turbo on GitHub // @namespace https://gist.github.com/PedroHLC/f6f238834f5ebdfaff5c1bf907745fcb // @version 1.0.6 // @author PedroHLC, Claude // @description Completely disables Turbo Drive on GitHub // @match https://github.com/* @@ -70,4 +70,15 @@ get() { return this._Turbo; }, configurable: true }); // Flip GitHub's own disable-turbo meta to true new MutationObserver((mutations) => { for (const m of mutations) { for (const node of m.addedNodes) { if (node.nodeType === 1 && node.tagName === 'META' && node.name === 'disable-turbo') { node.content = 'true'; } } } }).observe(document.documentElement, { childList: true, subtree: true }); })(); -
PedroHLC revised this gist
Feb 24, 2026 . 1 changed file with 10 additions and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ // ==UserScript== // @name Disable Turbo on GitHub // @namespace https://gist.github.com/PedroHLC/f6f238834f5ebdfaff5c1bf907745fcb // @version 1.0.5 // @author PedroHLC, Claude // @description Completely disables Turbo Drive on GitHub // @match https://github.com/* @@ -16,13 +16,20 @@ const meta = document.createElement('meta'); meta.name = 'disable-turbo'; meta.content = 'true'; // Belt-and-suspenders: also set the standard turbo visit control const meta2 = document.createElement('meta'); meta2.name = 'turbo-visit-control'; meta2.content = 'reload'; // Prevent changes new MutationObserver((_, obs) => { if (document.head) { document.head.prepend(meta2); document.head.prepend(meta); obs.disconnect(); } }).observe(document.documentElement, { childList: true }); // After Turbo boots, just disconnect it entirely document.addEventListener('turbo:load', function() { -
PedroHLC revised this gist
Feb 24, 2026 . 1 changed file with 10 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ // ==UserScript== // @name Disable Turbo on GitHub // @namespace https://gist.github.com/PedroHLC/f6f238834f5ebdfaff5c1bf907745fcb // @version 1.0.4 // @author PedroHLC, Claude // @description Completely disables Turbo Drive on GitHub // @match https://github.com/* @@ -37,6 +37,15 @@ e.preventDefault(); window.location.href = e.detail.url; }); document.addEventListener('turbo:before-fetch-request', function(e) { const frame = e.target.closest('turbo-frame'); if (frame) { e.preventDefault(); const url = e.detail.url?.href || e.detail.url; if (url) window.location.href = url; } }); // Kill prefetch document.addEventListener('turbo:before-prefetch', function(e) { -
PedroHLC revised this gist
Feb 24, 2026 . 1 changed file with 9 additions and 10 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ // ==UserScript== // @name Disable Turbo on GitHub // @namespace https://gist.github.com/PedroHLC/f6f238834f5ebdfaff5c1bf907745fcb // @version 1.0.3 // @author PedroHLC, Claude // @description Completely disables Turbo Drive on GitHub // @match https://github.com/* @@ -18,21 +18,20 @@ meta.content = 'true'; document.documentElement.appendChild(meta); // Belt-and-suspenders: also set the standard turbo visit control const meta2 = document.createElement('meta'); meta2.name = 'turbo-visit-control'; meta2.content = 'reload'; document.documentElement.appendChild(meta2); // After Turbo boots, just disconnect it entirely document.addEventListener('turbo:load', function() { if (window.Turbo?.session) { window.Turbo.session.drive = false; window.Turbo.session.disconnect(); } }, { once: true }); // Intercept Turbo navigations document.addEventListener('turbo:before-visit', function(e) { e.preventDefault(); -
PedroHLC revised this gist
Feb 24, 2026 . 1 changed file with 8 additions and 10 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ // ==UserScript== // @name Disable Turbo on GitHub // @namespace https://gist.github.com/PedroHLC/f6f238834f5ebdfaff5c1bf907745fcb // @version 1.0.2 // @author PedroHLC, Claude // @description Completely disables Turbo Drive on GitHub // @match https://github.com/* @@ -18,16 +18,14 @@ meta.content = 'true'; document.documentElement.appendChild(meta); // Override meta element's content property for disable-turbo const originalSetAttribute = Element.prototype.setAttribute; Element.prototype.setAttribute = function(name, value) { if (this.tagName === 'META' && this.name === 'disable-turbo' && name === 'content') { return originalSetAttribute.call(this, name, 'true'); } return originalSetAttribute.call(this, name, value); }; // Belt-and-suspenders: also set the standard turbo visit control const meta2 = document.createElement('meta'); -
PedroHLC revised this gist
Feb 24, 2026 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ // ==UserScript== // @name Disable Turbo on GitHub // @namespace https://gist.github.com/PedroHLC/f6f238834f5ebdfaff5c1bf907745fcb // @version 1.0.1 // @author PedroHLC, Claude // @description Completely disables Turbo Drive on GitHub // @match https://github.com/* -
PedroHLC revised this gist
Feb 24, 2026 . 1 changed file with 11 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -18,6 +18,17 @@ meta.content = 'true'; document.documentElement.appendChild(meta); // Watch for GitHub's disable-turbo meta tag and flip it to true new MutationObserver((mutations) => { for (const m of mutations) { for (const node of m.addedNodes) { if (node.nodeType === 1 && node.tagName === 'META' && node.name === 'disable-turbo') { node.content = 'true'; } } } }).observe(document.documentElement, { childList: true, subtree: true }); // Belt-and-suspenders: also set the standard turbo visit control const meta2 = document.createElement('meta'); meta2.name = 'turbo-visit-control'; -
PedroHLC revised this gist
Feb 24, 2026 . 1 changed file with 48 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,2 +1,49 @@ // ==UserScript== // @name Disable Turbo on GitHub // @namespace https://gist.github.com/PedroHLC/f6f238834f5ebdfaff5c1bf907745fcb // @version 1.0.0 // @author PedroHLC, Claude // @description Completely disables Turbo Drive on GitHub // @match https://github.com/* // @run-at document-start // @grant none // @updateURL https://gist.github.com/PedroHLC/f6f238834f5ebdfaff5c1bf907745fcb/raw/github-nuke-turbo.user.js // @downloadURL https://gist.github.com/PedroHLC/f6f238834f5ebdfaff5c1bf907745fcb/raw/github-nuke-turbo.user.js // ==/UserScript== (function() { // GitHub checks this meta tag natively const meta = document.createElement('meta'); meta.name = 'disable-turbo'; meta.content = 'true'; document.documentElement.appendChild(meta); // Belt-and-suspenders: also set the standard turbo visit control const meta2 = document.createElement('meta'); meta2.name = 'turbo-visit-control'; meta2.content = 'reload'; document.documentElement.appendChild(meta2); // Intercept Turbo navigations document.addEventListener('turbo:before-visit', function(e) { e.preventDefault(); window.location.href = e.detail.url; }); // Kill prefetch document.addEventListener('turbo:before-prefetch', function(e) { e.preventDefault(); }); // Disable Turbo.session.drive when it initializes Object.defineProperty(window, 'Turbo', { set(val) { if (val && val.session) { val.session.drive = false; } this._Turbo = val; }, get() { return this._Turbo; }, configurable: true }); })(); -
PedroHLC created this gist
Feb 24, 2026 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,2 @@ // ==UserScript== // ==/UserScript==