forked from stevekrouse/WoofJS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
team-full.html
59 lines (46 loc) · 1.98 KB
/
team-full.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<link rel="shortcut icon" type="image/png" href="./favicon.png"/>
<link rel="apple-touch-icon" href="./images/logo-1.png">
<meta name="apple-mobile-web-app-capable" content="yes">
<script src="https://www.gstatic.com/firebasejs/3.4.0/firebase.js"></script>
<script src="https://cdn.firebase.com/libs/firepad/1.4.0/firepad.min.js"></script>
<script data-presets="es2017" src="https://cdnjs.cloudflare.com/ajax/libs/babel-standalone/6.14.0/babel.min.js"></script>
<script type="text/javascript" src="./dist/woof.js"></script>
<script>
var config = {
apiKey: "AIzaSyBYHv7dCiD0bWiHRlcp4VIZCIqzoMnB4yY",
authDomain: "woofjs-d1b27.firebaseapp.com",
databaseURL: "https://woofjs-d1b27.firebaseio.com",
storageBucket: "woofjs-d1b27.appspot.com",
messagingSenderId: "397293370524"
};
firebase.initializeApp(config);
window.onhashchange = function() {
window.location.reload()
}
var getID = function() {
return window.location.hash.substring(1, window.location.hash.length).split("/")[0];
}
document.title = getID()
var firepadRef = firebase.database().ref("/team/" + getID());
var headless = new Firepad.Headless(firepadRef);
headless.getText(function(text) {
if (text == ""){
alert("There's no project called '" + getID() + "'. Sorry :(")
} else {
var c = Babel.transform(text, { presets: ['es2015'] }).code
c = c.replace("'use strict';", '')
var script = document.createElement( "script" );
script.type = "text/javascript";
script.text = c
document.body.appendChild(script)
}
});
</script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-82374072-1', 'auto');
ga('send', 'pageview');
</script>