chrome.storage.local.get "files", (vals) -> | |
# alert "Got stuff" | |
files = vals.files | |
fileTypes = ["tiles", "splats", "flair", "speedpad", "speedpadred", "speedpadblue", "portal"] | |
for type in fileTypes | |
if type of files | |
document.getElementById(type).src = files[type] | |
script = document.createElement("script") | |
script.textContent = """ | |
console.log("Hi from inside!"); | |
(function () { | |
(function () { | |
console.log("Hi") | |
try { | |
tagpro.api.redrawBackground() | |
} catch (e) { | |
console.log("Try again...") | |
setTimeout(arguments.caller.callee, 100) | |
} | |
})() | |
})() | |
""" | |
document.head.appendChild(script) | |
script.parentNode.removeChild(script) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment