跳转到主要内容

193 主意

作者:沐沐格子
(�/�d1�p:�D(:0S�%�;w�q��bP��X�E�E��5�l C �y��_��O���� sswf�����7B^/h�jq>�}ZO�{�i��v((C�j�B�2 �����q^;��u�Ꮎ����Y�zW��1���*�̧I �o�,�4�c#VS�D���U��M���ȵ�հ>�t��5dк��_���ȏ���b!Z�'�@~ j�!��Ȏ��M�B�LuЅ��חǯ2�F���AQ�/Yv��*S�� ��F׍��78���|�#� ����^e)]������!c�cd��H���1r������d߬oU��1�G� �g��X�W�2@/}7�{�t;!3B�F�g��~�i�,�>M�R� �I [�<..z��&�P�o��͊��8�u]=�eG^Мr�W�~B>�]:��L}@���A� l������lh��ȡ�2`�6�*Ӓ�5�q����V#{�@W P��F��=_F��\�ij�k�B>�T��B��|�i����'��#V_�I ��|�i5�cd�����X�_v��ʔ`B%��!x��&�b��N�5�O�$� P�c�R�� ��֫ �!Y��h�U��Ș�kg�I@Wt�5��%�5�]-p)SK�J�6�^F^F��c�\-@`+S �Ȑ�KLCD �V��z9� `ߥ|w1i����t�:��F���>4�C=���#�#�-�׵�ޯ�o%c!c����'d� �.�*S��.�W�"���9�KF�l���v��V�v�cM� 4�}diJD� �Ǒk�T}h\K�������!c,��F��wE�{]cYz��k�Z�!c�/eJ�0�����$�3B}�y��NȘ�(c��X�����wוs`�?�b!S��`tb�T}�X��%g@4I�ɠ'�4rg��p~j�ͱ��2Ml��C����Fmq4V��F3F�F.5\�F&%`;$�h��f�W#��v*觵v^ѻE��U�[�ur��M���is7��U����+�/�+�t��L�$��L����������U�X'_����5�S}@�0O�^�.�x���֐�+@ne�ʔ|���处-5�TH N��R��{ j���&�l��S�R�!� x����5��H��u���g [�T}��A�T�1�V2�c�25�S�Mǘ<�\��H�K㝐+��J�,n��W�N�{PGȘ���X��yI��|�*��f&;rݡ�l#�I�VH�@A3��F���8rb�#ͯj@�,�ѧ_e�!�9�)��z\��F��x��/��j���q��27~��p�� 7�"2�3pIvFȁ�|�@��#VG�V]Dc!��G��p ��vdwp���A�y|����W�NW�Nl��y�Z��i�u ZOl6�j@���6���� �_�w��aC?�E�����`���YܫLI�W#����c��CZi� �}7�Y�ћ�x+;��q�kd���_|zd� �J�V:�:�L?�c�Y�&�~����#[F��h �[��t�h,d�bZG�� z��1�U���5��@�#� �[`�2�s�� ������G�/"�Y\��r]\���G��yEL7p�Pob�g�������ѼVWt'�b�A��]t����jK��LA�2)./�!c!W�_D&��!Q+����+M�,;�l����q�8 e�#!�@ �=<�!$ ��;gq�Xs.0an�@����VAg���4�>��7���� �rJ�K��.�É�� �3��ܖ@y�"k�j� �)���ix2xgC��o��J���..J�F`��B�{� ��+ms���>�I'm%���h^�l ?b͛��r�G�w����h@=�<�L�H�d�VfF� �I�rHS�j[%�h�����ؖ�C���0�����6e���A�~�����r����a]��!�;�}7�p�Ҍ�y���L�<�I�2)(�`��kV��j �� 7�)�MX��v���-����J]!L��'�}�����LN ��-=�#����,�7�� �!E�`�$��%�|<�R��8��%m<+�(�D4!T��/ܥٙ2���SZ%t�HNBsː�BN���b&dw��>J���nf�+�y��\$EVN��!��}�"��?� (a�vj�f�~�N��W݂23��2��TC8�J���]�N�L��<���Ere�B� �4��ol% �K@�X?�}�H��)�b랙�4#���4 { // 初始化认证状态 initAuthState(); // 注意:阅读历史已由reading_history.js自动处理,无需手动调用 const themeToggle = document.getElementById('theme-toggle'); const themeToggleIcon = document.getElementById('theme-toggle-icon'); const html = document.documentElement; // 检查本地存储中的主题偏好 const currentTheme = localStorage.getItem('theme') || 'light'; html.classList.add(currentTheme); // 更新图标 if (themeToggleIcon) { themeToggleIcon.className = currentTheme === 'dark' ? 'ri-moon-line text-xl' : 'ri-sun-line text-xl'; } // 切换主题 if (themeToggle) { themeToggle.addEventListener('click', () => { const isDark = html.classList.contains('dark'); if (isDark) { html.classList.remove('dark'); html.classList.add('light'); localStorage.setItem('theme', 'light'); if (themeToggleIcon) { themeToggleIcon.className = 'ri-sun-line text-xl'; } } else { html.classList.remove('light'); html.classList.add('dark'); localStorage.setItem('theme', 'dark'); if (themeToggleIcon) { themeToggleIcon.className = 'ri-moon-line text-xl'; } } }); } // 字体大小调整 const content = document.querySelector('.reading-container'); const fontDecreaseBtn = document.getElementById('font-decrease'); const fontIncreaseBtn = document.getElementById('font-increase'); const readingModeBtn = document.getElementById('reading-mode'); const addBookmarkBtn = document.getElementById('add-bookmark'); // 从本地存储获取字体大小设置 let fontSize = parseInt(localStorage.getItem('fontSize')) || 18; content.style.fontSize = `${fontSize}px`; // 减小字体 fontDecreaseBtn.addEventListener('click', () => { if (fontSize > 14) { fontSize -= 1; content.style.fontSize = `${fontSize}px`; localStorage.setItem('fontSize', fontSize); } }); // 增大字体 fontIncreaseBtn.addEventListener('click', () => { if (fontSize < 26) { fontSize += 1; content.style.fontSize = `${fontSize}px`; localStorage.setItem('fontSize', fontSize); } }); // 阅读模式切换 readingModeBtn.addEventListener('click', () => { document.body.classList.toggle('reading-mode'); if (document.body.classList.contains('reading-mode')) { // 隐藏导航和其他元素,只显示内容区 document.querySelector('header').style.display = 'none'; document.querySelectorAll('.section-container > *:not(main)').forEach(el => { el.style.display = 'none'; }); document.querySelector('main').classList.add('reading-mode-active'); document.querySelector('.fixed.bottom-0').style.display = 'none'; // 隐藏移动端底部导航 } else { // 恢复正常显示 document.querySelector('header').style.display = ''; document.querySelectorAll('.section-container > *:not(main)').forEach(el => { el.style.display = ''; }); document.querySelector('main').classList.remove('reading-mode-active'); document.querySelector('.fixed.bottom-0').style.display = ''; // 显示移动端底部导航 } }); // 书签功能 addBookmarkBtn.addEventListener('click', () => { const bookmarks = JSON.parse(localStorage.getItem('bookmarks') || '[]'); const currentBookmark = { novelId: 'rongxiang', chapterId: '86402972', novelTitle: '荣香', chapterTitle: '193 主意', timestamp: new Date().toISOString() }; // 检查是否已存在相同的书签 const exists = bookmarks.some(bookmark => bookmark.novelId === currentBookmark.novelId && bookmark.chapterId === currentBookmark.chapterId ); if (!exists) { // 限制书签数量为10个 if (bookmarks.length >= 10) { bookmarks.pop(); // 移除最旧的书签 } bookmarks.unshift(currentBookmark); // 添加到最前面 localStorage.setItem('bookmarks', JSON.stringify(bookmarks)); // 显示成功提示 alert('书签添加成功'); } else { alert('书签已存在'); } }); });

看小说网

看小说网是您最喜欢的免费小说阅读网站。提供海量全本小说免费阅读,所有小说无广告干扰,是您值得收藏的小说网站。

© 2023 看小说网 版权所有