the browser-facing portion of osu!
at master 826 B view raw
1// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0. 2// See the LICENCE file in the repository root for full licence text. 3 4import Highlight from 'docs/highlight'; 5import Search from 'docs/search'; 6import SetLanguage from 'docs/set-language'; 7import SidebarToggle from 'docs/sidebar-toggle'; 8import Tocify from 'docs/tocify'; 9 10declare global { 11 interface Window { 12 docs: Docs; 13 } 14} 15 16class Docs { 17 readonly highlight = new Highlight(); 18 readonly search; 19 readonly setLanguage = new SetLanguage(); 20 readonly sidebarToggle = new SidebarToggle(); 21 readonly tocify = new Tocify(); 22 23 constructor() { 24 // depends on Tocify to be initialised 25 this.search = new Search(); 26 } 27} 28 29document.addEventListener('DOMContentLoaded', () => { 30 window.docs = new Docs(); 31});