Linux ms3020串口驱动移植

485模块驱动移植和测试

嵌入式

Linux系统CAN通信开发指南

Linux下实现CAN功能

程序设计

RK3588移植GPSD

GNSS定位解析

嵌入式

Linux环境下使用ADB命令做嵌入式开发

adb命令支持远程调试

嵌入式

long数据类型跨平台问题

跨平台数据类型大小

程序设计

cJson数据格式问题

Bug解决

程序设计

vim轻度使用指南

小而美的文本编辑器

开发工具

tar命令

tar命令常见用法

开发工具

下里巴人
海纳百川,文以载道
hywing技术自留地
总访问 113701 次 | 本页访问 326
theme) } applyThemeToGiscus(theme) } const applyThemeToGiscus = (theme) => { theme = theme === 'auto' ? 'preferred_color_scheme' : theme const cmt = document.getElementById('giscus') if (cmt) { // This works before giscus load. cmt.setAttribute('data-theme', theme) } const iframe = document.querySelector('#comments > section.giscus > iframe') if (iframe) { // This works after giscus loaded. const src = iframe.src const newSrc = src.replace(/theme=[\w]+/, `theme=${theme}`) iframe.src = newSrc } } const switchTheme = () => { // light -> dark -> auto -> light -> ... const currentTheme = document.documentElement.getAttribute('data-theme') let newTheme; switch (currentTheme) { case 'light': newTheme = 'dark' break case 'dark': newTheme = 'auto' break default: newTheme = 'light' } applyTheme(newTheme) window.localStorage.setItem('Stellar.theme', newTheme) const messages = { light: `切换到浅色模式`, dark: `切换到深色模式`, auto: `切换到跟随系统配色`, } hud?.toast?.(messages[newTheme]) } (() => { // Apply user's preferred theme, if any. const theme = window.localStorage.getItem('Stellar.theme') if (theme !== null) { applyTheme(theme) } })()