Created
March 3, 2014 00:31
-
-
Save JJJollyjim/9316333 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
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