筛查指路径和指定列表的任务
seehttps://ld246.com/article/1734858211967 筛选指定路径和指定列表的任务如果仅用 SQL 实现的话,主要带有子任务的父任务不好处理。我这里通过取巧的方式实现了仅 SQL 查询,需要一段 css 配合一下,原理就是把指定 SQL 的子任务给隐藏起来。SQL1:在路径内随机索引单个任务项--random-task-hpath 这里的注释不要删除且必须再第一行且必须--开头且不能有空
seehttps://ld246.com/article/1729433743536https://www.frp.cool/注册不了(注册时提示已发送邮件验证码,其实根本没有发送)。@Jhpzzerotier 访问端必须安装客户端,且必须加入到虚拟网络并授权。@xinge 结点小宝,不支持手机端,即它仅支持电脑端的内网穿透,手机端虽然有 app,只是为了便捷操作电脑客户端,并不能为手机端内网穿透。另外,
seehttps://ld246.com/article/1734674966885 到这里访问插件列表 https://github.com/siyuan-note/bazaar/blob/main/stage/plugins.json 搜到后,去作者 github 下载后复制到插件目录即可,注意,目录名要参考 plugin.json 中的 name 命名,不然可能无法加载插件。模板列表 https://github
see//左侧 dock 空白区显示心灵毒鸡汤//see//功能介绍://1.左侧 dock 空白区域显示心灵毒鸡汤//2.双击显示下一个//3.右键复制到剪切板//4.可显示为跑马灯效果(()=>{//设置多久显示一次,单位秒,默认 5 分钟 constdelay=300;//是否显示为跑马灯效果,true 显示为跑马灯效果 constmarquee=false;//鼠标悬停时是否显示提示 constshowTitl
//获取光标所在元素的上级标题,当不存在时显示文档标题//seehttps://ld246.com/article/1734576044332//seehttps://ld246.com/article/1729605574188//see(()=>{//添加样式 addStyle(`.fn__flex-1.dock__item--space{display:flex;justify-content:
圣诞快乐 css
seehttps://ld246.com/article/1734435831275#barWorkspace{position:relative;}#barWorkspacespan.toolbar__text{font-weight:bold;font-size:14px;/*彩虹文字颜色*/animation:rainbow4sinfinitelinear;}#barWorkspacespan
toolbar 被添加事件(async()=>{observeToolbar((el)=>{console.log(el,'toolbar');});//监听 toolbar 被添加 functionobserveToolbar(callback){//创建一个观察者实例并传入回调函数 constobserver=newMutationObserver((mutationsList,observer)=>{f
css 选择 xlink:href 属性 seehttps://ld246.com/article/1734427196426@namespacexlink'http://www.w3.org/1999/xlink';.protyle-breadcrumb__item:has(use[xlink|href*=iconListItem]).protyle-breadcrumb__text{display:no
seehttps://ld246.com/article/1734407382742/comment/1734440753272?r=wilsons#comments//!jsreturn(async()=>{//等待时长,默认 60 秒 constwaitForTime=60;getWeather();asyncfunctiongetWeather(){constweather=awaitfetch('
seehttps://ld246.com/article/1734430072051//启动时最小化到托盘//seehttps://github.com/siyuan-note/siyuan/blob/5129ad926a21176a352cf5f630e0651011bf9c83/app/src/boot/onGetConfig.ts#L115if(!localStorage.getItem('_
seehttps://github.com/siyuan-note/siyuan/blob/5129ad926a21176a352cf5f630e0651011bf9c83/app/src/boot/onGetConfig.ts#L167require('electron').ipcRenderer.on('siyuan-open-url',(event,url)=>{console.log(eve
查询某一个子文档下面不含标签的文档 seehttps://ld246.com/article/1723590423117SELECT*FROMblockswheretype='d'andpathlike'%20240725203634-j3t72jv/%'andtag=''andidnotin(SELECTroot_idFROMblockswheretype<>'d'andpathlike'%2024
seehttps://ld246.com/article/1734263645595//调用示例,当 callback 返回 true 时退出,返回 false 时取消退出 functionsleep(ms){returnnewPromise(resolve=>setTimeout(resolve,ms));}listenExit(async()=>{console.log('waiting');awaitsle
思源如何给日记模板添加天气
seehttps://ld246.com/article/1734002304855 一,日记模板由于思源模板中无法执行 js,也就无法调用天气 api 了。所以这里可以利用 sql 查询模板变相执行 js 实现。比如这个示例模板,只需要把这段 js 放到模板里,然后模板加载时就可以显示天气了。//!jsreturn(async()=>{//获取天气 getWeather();asyncfunctiongetWeathe
在数据库中实现 js 与 Sprig 模板的交互
seehttps://ld246.com/article/1734002304855 在数据库模板中可以利用 img 标签实现 js 与 Sprig 模板的交互,利用 js 来处理数据,就更方便了。比如:.action{$blocks:=queryBlocks"select*fromblockslimit1"}<span><imgsrc=""data-result='.action{toJson$blocks}'st
seehttps://ld246.com/article/1733365731025 数据库添加非绑定的块和属性值/api/av/appendAttributeViewDetachedBlocksWithValueavID:数据库 id,非块 idblocksValueslist,数据库要添加的行 blocksValues 是个二维数组,对应表格视图的行列参数中的值可以参考源码 kernel/av/value.
日志模板//!jsreturn(async()=>{//获取天气 getWeather();asyncfunctiongetWeather(){//天气 apiconstweather=awaitfetch('https://wttr.in/?format=1');consttext=awaitweather.text();//显示当时的天气 render(text);//始终显示今天的天气//rende
seehttps://ld246.com/article/1733962469913seehttps://ld246.com/article/1729676228605url 后面加参数?id=xxx&focus=true,focus是带聚焦
seehttps://ld246.com/article/1733921523331.action{$total:=0}.action{$id:=.id}.action{$blocks:=queryBlocks"select*fromblockswhereroot_id='?'andid!='?'"$id$id}.action{range$v:=$blocks}.action{$len:=len$v