forked from github/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
39 lines (38 loc) · 1.24 KB
/
index.js
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
// Import our SCSS files so webpack will process them
import '../stylesheets/index.scss'
import displayPlatformSpecificContent from './display-platform-specific-content'
import explorer from './explorer'
import search from './search'
import nav from './nav'
import browserDateFormatter from 'browser-date-formatter'
import sidebar from './sidebar'
import wrapCodeTerms from './wrap-code-terms'
import print from './print'
import localization from './localization'
import helpfulness from './helpfulness'
import experiment from './experiment'
import copyCode from './copy-code'
import { fillCsrf } from './get-csrf'
import initializeEvents from './events'
import filterCodeExamples from './filter-code-examples'
import allArticles from './all-articles'
import devToc from './dev-toc'
document.addEventListener('DOMContentLoaded', async () => {
displayPlatformSpecificContent()
explorer()
search()
nav()
browserDateFormatter()
sidebar()
wrapCodeTerms()
print()
localization()
copyCode()
filterCodeExamples()
allArticles()
devToc()
await fillCsrf() // this must complete before any POST calls
initializeEvents() // requires fillCsrf to complete
experiment() // requires fillCsrf to complete
helpfulness() // requires fillCsrf to complete
})