Last active
January 6, 2020 13:11
-
-
Save ailispaw/2f15aeabf922afada020 to your computer and use it in GitHub Desktop.
Fix missing ctx.host for Chrome Dev 43
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
// ==Taberareloo== | |
// { | |
// "name" : "Fix missing ctx.host" | |
// , "description" : "Fix missing ctx.host" | |
// , "include" : ["content"] | |
// , "match" : ["*://*/*"] | |
// , "version" : "0.1.1" | |
// , "downloadURL" : "https://gist.githubusercontent.com/ailispaw/2f15aeabf922afada020/raw/patch.fix.missing.ctx.host.tbrl.js" | |
// } | |
// ==/Taberareloo== | |
(function() { | |
addAround(TBRL, 'createContext', function (proceed, args, target, methodName) { | |
var ctx = proceed(args); | |
if (!ctx.host) { | |
ctx = update(ctx, url.parse(location.href)); | |
} | |
return ctx; | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment