Last active
November 11, 2018 14:28
-
-
Save jz5/32a4179533eb7d4fa183504075059847 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
const timer = setInterval(timer_tick, 500); | |
var prevId; | |
var div = document.createElement("div"); | |
var body = document.getElementsByTagName("body")[0]; | |
body.appendChild(div); | |
function timer_tick() { | |
var result = document.documentElement.innerHTML.match(/assetstore_package_(\d+)/); | |
if (!result) return; | |
var id = result[1]; | |
if (prevId === id) return; | |
div.innerHTML = '<iframe src="https://api.assetstore.unity3d.com/affiliate/embed/package/' + id + '/widget-wide-light?aid=1011l478Q" style="width:600px; height:130px; border:0px;"></iframe>'; | |
prevId = id; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment