mirror of https://github.com/muety/wakapi.git
15 lines
436 B
JavaScript
15 lines
436 B
JavaScript
|
PetiteVue.createApp({
|
||
|
//$delimiters: ['${', '}'], // https://github.com/vuejs/petite-vue/pull/100
|
||
|
activeTab: defaultTab,
|
||
|
isActive(tab) {
|
||
|
return this.activeTab === tab
|
||
|
},
|
||
|
updateTab() {
|
||
|
this.activeTab = window.location.hash.slice(1) || defaultTab
|
||
|
},
|
||
|
mounted() {
|
||
|
this.updateTab()
|
||
|
window.addEventListener('hashchange', () => this.updateTab())
|
||
|
}
|
||
|
}).mount('#leaderboard-page')
|