mirror of
https://github.com/hyzendust/hyzendust.github.io.git
synced 2026-06-30 23:12:16 +02:00
Update: hidden uninotes
This commit is contained in:
@@ -1,3 +1,14 @@
|
||||
<script>
|
||||
(function () {
|
||||
// Hide UniNotes menu item for everyone except hyzen
|
||||
document.querySelectorAll('.menu__item').forEach(function (li) {
|
||||
var a = li.querySelector('a');
|
||||
if (a && a.getAttribute('href') === '/uninotes/') {
|
||||
li.classList.add('menu__item--uninotes');
|
||||
}
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
<script>
|
||||
(function () {
|
||||
var btn = document.getElementById('theme-toggle');
|
||||
|
||||
@@ -17,6 +17,9 @@
|
||||
(function(){
|
||||
var t = localStorage.getItem('theme');
|
||||
if (t) { document.documentElement.setAttribute('data-theme', t); }
|
||||
if (localStorage.getItem('f4_username') === 'hyzen') {
|
||||
document.documentElement.classList.add('hyzen-user');
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user