Skip to content

Instantly share code, notes, and snippets.

@jz5
Last active November 11, 2018 14:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jz5/32a4179533eb7d4fa183504075059847 to your computer and use it in GitHub Desktop.
Save jz5/32a4179533eb7d4fa183504075059847 to your computer and use it in GitHub Desktop.
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