diff --git a/.gitignore b/.gitignore index 003b7c6f..e9307c18 100644 --- a/.gitignore +++ b/.gitignore @@ -1,14 +1,9 @@ .DS_Store node_modules -.sapper -__sapper__ -yarn.lock -templates/.* -static/*.css +/__sapper__ /mastodon -mastodon.log -static/robots.txt -/inline-script-checksum.json +/mastodon.log +/static/*.css +/static/robots.txt /static/inline-script.js.map -/templates/.* -/src/manifest/ +/inline-script-checksum.json diff --git a/static/inline-script.js.map b/static/inline-script.js.map deleted file mode 100644 index fae0b390..00000000 --- a/static/inline-script.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"inline-script.js","sources":["src/routes/_utils/themeEngine.js","inline-script.js","src/routes/_utils/testStorage.js"],"sourcesContent":["let meta = process.browser && document.getElementById('theThemeColor')\nlet offlineStyle = process.browser && document.getElementById('theOfflineStyle')\n\nfunction getExistingThemeLink () {\n return document.head.querySelector('link[rel=stylesheet][href^=\"/theme-\"]')\n}\n\nfunction resetExistingTheme () {\n let existingLink = getExistingThemeLink()\n if (existingLink) {\n document.head.removeChild(existingLink)\n }\n}\n\nfunction loadCSS (href) {\n let existingLink = getExistingThemeLink()\n\n let link = document.createElement('link')\n link.rel = 'stylesheet'\n link.href = href\n\n link.addEventListener('load', function onload () {\n link.removeEventListener('load', onload)\n if (existingLink) { // remove after load to avoid flash of default theme\n document.head.removeChild(existingLink)\n }\n })\n\n // inserting before the offline