treesummaryrefslogcommitdiff
path: root/script.js
diff options
context:
space:
mode:
authorPatrick Schönberger2018-12-05 14:55:27 +0100
committerPatrick Schönberger2018-12-05 14:55:27 +0100
commit751ad80e1f6880faedb233c104d112f614dd2771 (patch)
tree5100ba06f045b96844c89084f1494ebf504267ad /script.js
parentc469ea1cd9f021a7a6dd992e631bb7a2c2d00cc7 (diff)
downloadlolstats-751ad80e1f6880faedb233c104d112f614dd2771.tar.gz
lolstats-751ad80e1f6880faedb233c104d112f614dd2771.zip
removed mustache and live reload
Diffstat (limited to 'script.js')
-rw-r--r--script.js55
1 files changed, 0 insertions, 55 deletions
diff --git a/script.js b/script.js
deleted file mode 100644
index 1d861e1..0000000
--- a/script.js
+++ /dev/null
@@ -1,55 +0,0 @@
-let redSkins = [
- "Jhin_4",
- "Aatrox_0",
- "Akali_2",
- "Darius_15",
- "Gangplank_8",
- "Varus_7",
-];
-
-function randomElement(array) {
- return array[Math.floor(Math.random() * array.length)];
-}
-let champ1 = "http://ddragon.leagueoflegends.com/cdn/img/champion/loading/" + randomElement(redSkins) + ".jpg";
-let champ2 = "http://ddragon.leagueoflegends.com/cdn/img/champion/splash/" + randomElement(redSkins) + ".jpg";
-let ionia1 = "https://am-a.akamaihd.net/image?f=https%3A%2F%2Funiverse-meeps.leagueoflegends.com%2Fv1%2Fassets%2Fimages%2Fmttargon-eternal-winter-of-the-mountaintop.jpg";
-let ionia2 = "https://am-a.akamaihd.net/image?f=https%3A%2F%2Funiverse-meeps.leagueoflegends.com%2Fv1%2Fassets%2Fimages%2Ffactions%2Fmount-targon_splash.jpg";
-
-function getType() {
- return window.innerWidth < window.innerHeight;
- return (typeof window.orientation !== 'undefined');
-}
-
-var bg = new Vue({
- el: '#background',
- data: {
- image: getType() ? ionia1 : ionia2,
- }
-});
-
-function onResize() {
- if (getType()) bg.image = ionia1;
- else bg.image = ionia2;
-}
-
-var start = new Vue({
- el: '#start',
- data: {
- visible: true,
- regions: [ "EUW", "NA" ],
- matches: [],
- categories: [
- { text: "No.", name: "no" },
- { text: "Queue", name: "qu" },
- { text: "Champion", name: "ch" },
- { text: "Result", name: "rs" },
- { text: "Duration", name: "du" },
- { text: "Date", name: "da" }
- ],
- },
- methods: {
- showNextPanel: function() {
- start.visible = false;
- },
- },
-});