File tree 1 file changed +0
-23
lines changed
1 file changed +0
-23
lines changed Original file line number Diff line number Diff line change 6
6
var head = document . head ,
7
7
rootEl = document . documentElement
8
8
9
- function addStyleSheet ( res ) {
10
- var link = document . createElement ( 'link' )
11
-
12
- if ( res . integrity &&
13
- res . href . slice ( 0 , 6 ) === 'https:' ) {
14
- link . crossOrigin = 'anonymous'
15
- link . integrity = res . integrity
16
- }
17
-
18
- link . rel = 'stylesheet'
19
- link . href = res . href
20
- head . appendChild ( link )
21
- }
22
-
23
9
function toggleOffline ( ) {
24
10
rootEl . classList . toggle ( 'offline' )
25
11
}
26
12
27
13
/*--------------------------------------------------------------------------*/
28
14
29
- { % assign resources = site . data . init . array % }
30
- { % for res in site . vendor . css % }
31
- { % assign object = res | jsonify % }
32
- { % assign resources = resources | push :object % }
33
- { % endfor % }
34
-
35
- // Add asynchronous style sheets.
36
- [ { { resources | join :',' } } ] . forEach ( addStyleSheet )
37
-
38
15
{ % if jekyll . environment == 'production' % }
39
16
// Register service worker.
40
17
if ( 'serviceWorker' in navigator ) {
You can’t perform that action at this time.
0 commit comments