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)]; } function getType() { return (typeof window.orientation !== 'undefined'); } var bg = new Vue({ el: '#background', data: { image: "http://ddragon.leagueoflegends.com/cdn/img/champion/" + (getType() ? "loading/" : "splash/") + randomElement(redSkins) + ".jpg", mobile: getType(), } }); 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; }, }, });