diff options
author | Rasmus Andersson <rasmus@notion.se> | 2017-11-29 04:13:41 +0300 |
---|---|---|
committer | Rasmus Andersson <rasmus@notion.se> | 2017-11-29 04:13:41 +0300 |
commit | 87d3e3c107ca98cac1fd1006295801f25c640b23 (patch) | |
tree | fd28a12bdee3bb50f3c4c196df0db6fd65f193b0 /docs/lab/index.html | |
parent | 5302601f9935558fd9be372ff5fd1f396f3c2935 (diff) | |
download | inter-87d3e3c107ca98cac1fd1006295801f25c640b23.tar.xz |
website: make sure the font files are always loaded fresh in the lab
Diffstat (limited to 'docs/lab/index.html')
-rw-r--r-- | docs/lab/index.html | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/docs/lab/index.html b/docs/lab/index.html index 52c3bfd7f..994aa953e 100644 --- a/docs/lab/index.html +++ b/docs/lab/index.html @@ -1084,7 +1084,9 @@ const fontVersion = Math.round(Date.now()).toString(36) let fontFamilyName = 'Inter-UI-v' + fontVersion const fontCSSTemplate = document.querySelector('#font-css') const fontCSS = fontCSSTemplate.cloneNode(true) -fontCSS.innerHTML = fontCSS.innerHTML.replace(/Inter-UI-VERSION/g, fontFamilyName) +fontCSS.innerHTML = fontCSS.innerHTML + .replace(/Inter-UI-VERSION/g, fontFamilyName) + .replace(/(\.woff2?)/g, '$1?r='+fontVersion) fontFamilyName += ", 'Inter UI'" fontCSS.setAttribute('id', '') fontCSS.setAttribute('type', 'text/css') |