Last active
April 20, 2020 09:10
-
-
Save sapphyrus/82caca7a89559caceeb5a80bf4aadbe5 to your computer and use it in GitHub Desktop.
This file contains 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 gamesense.pub turbolinks | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description injects turbolinks into gamesense.pub forums | |
// @author sapphyrus | |
// @match https://gamesense.pub/forums/* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
var t=document.createElement("script"); | |
t.setAttribute("src", "https://cdnjs.cloudflare.com/ajax/libs/turbolinks/5.2.0/turbolinks.js"); | |
t.onload = function(){ | |
Turbolinks.Location.prototype.isHTML = function() { | |
return this.getExtension().match(/^(?:|\.(?:htm|html|xhtml|php))$/); | |
}; | |
}; | |
document.getElementsByTagName("head").item(0).appendChild(t); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment