mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-10-28 21:35:49 -04:00
wrap dark mode stuff in an anonymous function like a big boy coder
This commit is contained in:
@@ -2,6 +2,9 @@
|
||||
|
||||
// inspired by https://codepen.io/kevinpowell/pen/EMdjOV
|
||||
|
||||
(function() {
|
||||
'use strict';
|
||||
|
||||
// lightbulb toggle re-appears now that we know user has JS enabled
|
||||
const toggle = document.querySelector('button#dark-mode-toggle');
|
||||
toggle.style.visibility = 'visible';
|
||||
@@ -98,3 +101,4 @@ toggle.addEventListener('click', function() {
|
||||
localStorage.setItem('dark_mode_pref', 'false');
|
||||
}
|
||||
}, true);
|
||||
})();
|
||||
|
||||
6
assets/vendor/emoji/emoji.js
vendored
6
assets/vendor/emoji/emoji.js
vendored
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
var emoji = (function (
|
||||
(function (
|
||||
|
||||
// WARNING: this file is generated automatically via
|
||||
// `node scripts/build.js`
|
||||
@@ -570,6 +570,4 @@ var emoji = (function (
|
||||
return r.join(sep || '-');
|
||||
}
|
||||
|
||||
}());
|
||||
|
||||
emoji.parse(document.body);
|
||||
}()).parse(document.body);
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
{{ block "main" . }}{{ end }}
|
||||
</div>
|
||||
{{ partialCached "page/footer" . }}
|
||||
{{ partial "scripts/_bundle" . }}
|
||||
{{ partial "scripts/shortcodes" . }}
|
||||
{{ if eq hugo.Environment "production" }}
|
||||
{{ partialCached "scripts/simple_analytics" . }}
|
||||
|
||||
@@ -8,5 +8,4 @@
|
||||
{{ partialCached "head/feeds" . -}}
|
||||
{{ partialCached "head/webmention" . -}}
|
||||
{{ partial "head/canonical" . -}}
|
||||
{{ partial "scripts/_bundle" . }}
|
||||
{{ partial "head/schema" . -}}
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
<script async defer src="https://s.jarv.is/app.js" data-skip-dnt="true"></script>
|
||||
<script async defer src="https://s.jarv.is/latest.js" data-skip-dnt="true"></script>
|
||||
<noscript><img src="https://s.jarv.is/image.gif" alt=""></noscript>
|
||||
|
||||
Reference in New Issue
Block a user