additionals/app/views/wiki/_cryptocompare.html.slim
2017-12-15 12:05:26 +01:00

17 lines
553 B
Plaintext

.cryptocompare
javascript:
var scripts = document.getElementsByTagName("script");
var embedder = scripts[scripts.length - 1];
(function() {
var appName = encodeURIComponent(window.location.hostname);
if (appName == "") {
appName = "local";
}
var s = document.createElement("script");
s.type = "text/javascript";
s.async = true;
var theUrl = "#{raw url}";
s.src = theUrl + (theUrl.indexOf("?") >= 0 ? "&" : "?") + "app=" + appName;
embedder.parentNode.appendChild(s);
})();