跳转到主要内容

第344章

作者:我是幽默吖
(�/�d &�J� -? *p&�;w�!/#K�-o�f/n ����EBPK���l͢�'b$d�tA��c�1�1����T�r�S�?{�z��Y1^)�쑠Y�j*MR�)J��"����T^흜��h�z��-!p�Aq'��C�^(q�H\�ǻ�@��ge�/�]��<����(Tc� �65�L�<�8�Y��x���ݙ5�UF����ٛ-�: 3�q/s�kM����f����v�%4b�LK�-����.��X�D����v�^r�WO����2d�u�Փ��m����5�Xgeʰכt��}o��255�� ԬP 㢚-W�< s�BC��3 ��8��vpq� dz2�TP �e�����3_*�����剫�x )S�HP,��-�ʃ�c_c*h�@�z^-*�߸t�W1^�8ތ�Y�Z P����v��R��O8sV�!)o�����R�h�myx#�Y�Ϙ9�z 9r����LŅW{3����%A�����A��4�A��`P_�j�*yGaU���(������I3ge�h8�Җ�K�7�v}���)��j��ꐇ��9�m�m�)a�4o|�1iJ|��,e*n����R�W�n��z��)�q2���v[�ȋ@އ뜭�ϼ�#�N`\��ə;��W���~}�w�r�|�&��2匸���z��Sص�Y�"�w��@�;Gb���Le]9�W���̖�]�Y����.0`�@�D]`�s� ��TZ!>�ZaެL��]w��'7�Bʵ�!�h��œ�qq[^�偃�^�6���t�����rIs�h�x=Fc�-�f��9�h 唰O� {3�f0W���x��W�Xw�N�G �U"ڄ5gu"ҥ�) j�=ܷ�Ga^@��-l��j�C�Ƅ�Z�z�[0{�����x��|1/��ø���"S�,�z\��ݞ9[���� ���Ƈ3�n�L����>~��my�3懂3� ������B�G�xAf����7$�LE�\����;�{�����<���Aғ3w���{�[�6٤ow�s=+�H՛����x5�''��d�BîG�n��!�wO)��p���v\v���;�T���_=5쭗��zzX�������Y�z.�p� �/��bK� �Z��~vm)�,�'����E08^Dٗ�!�[�[�xq����5�/�� �y�{j/475��~FЬL�� ���j/��=�jy���9�Ɋ�n �R��-��Jw�� )����s=��s���9%l���x����?�~�p"���ꉓ�ezصA=�� ��V�g̖�9�h��$����pV�X�a�`KE\�w$AA 8[���7B��Ԡ+��Z�놽��# ��aKE?�5#d����]fȨ�;�7�W��0sVg�8��a�"��xEbk����b�'?��ď$�O�B����/!0�5'sK�:��ru�VZ���A����N�l)�͈9���QejVycoV��”l\��[ 3�a�Q.!�G��d����1�����0����ִ�-P� �n�P��L����-�J�WuȽ��P ;�8�� �ެ�Hm�Y�zg����W��î�H�]g4� �>�` �c��t'g��[�-��T�H퐻�aQ՝�Y�V¬�Z��3`�8��k)ݰ��<�Лy�R1^n�2l{�ge���fo��ϙ�-w�O.�%���'���9�;��6�5E40@4P@��.H @`� �@ �� �2���5�q ��%�9�� ���V@a��q� (�UԺ�f祿�9�3W�?�A��6y��{⼨jIy7{-��0l&�y�אx {�t;�$Ma��p��u qV��M��G�܎5�c����j���î�/ <�7k��!^s(=+�1�|��r���L��� ��[���0 �d�j���tͼ6u��.�O0 2xصY�؇Y/ȋ} ,~�ě�%QP )��geJ�p�^�kM�G � ��e0: �n������䯞��A{��JP���E3�� ������y� �Ҝ� �>�W���id�y���d^!�A�HQբ��nc�@^0#����Q�@l��A{j���aPP�v�g_=�W�7�� ���3?.� }s��—���'���xJ|H|Y����ڬ�J��lyx�9��l�~�?H��{��TZ��l�IE��<��yyi��&�È�#Vp膽�DlSsq���'�;.�q�BS�ܝ٣.�:2^�F# ��% ��2xV�^y�0c_琻���9��� r�`��(̞�9~�pi�PP6^;��80?�V�׬�91xH���M�̑؁��q��ߙ=���1�NT�Q�����ge����ݙhV�W�N�x�23��0I #����02 �ř:��A-���LذD�G5� Wblzv�Qg���7�􁈪���!�~�F0�^H�|�8��;ѥa�`-1a�M�x��l�]'�� { // 初始化认证状态 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: 'mszfscqsc', chapterId: '49328921', novelTitle: '末世之封少宠妻手册', chapterTitle: '第344章', 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 看小说网 版权所有