Created
August 21, 2020 02:49
-
-
Save shaomingquan/0aa5ee3cc5af11d5904d33de32b860c3 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
var oldHeadAppend = HTMLHeadElement.prototype.appendChild | |
HTMLHeadElement.prototype.appendChild = function () { | |
var args = [].slice.call(arguments) | |
var child = args[0] | |
if (child instanceof HTMLScriptElement) { | |
child.src = child.src + ('?ts=' + Date.now()) | |
} | |
return oldHeadAppend.apply(this, args) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment