FlowUs 息流
- Kenshin Wang
- 联络方式
- 2022/11/28 15:43:44
- 技术
- 适配代码
{
"css": "sr-deeplink {\n display: flex;\n justify-content: center;\n margin: 16px auto;\n padding: 12px 12px 9px 12px;\n border: 3px solid #F6F6F6;\n}",
"desc": "",
"exclude": [
"<sr-bad-empty>"
],
"include": "[[{(()=>{let html='';$('body [data-page-id]').children().map((_,item)=>{const inlineBlock=content=>{let tmpl='';$.parseHTML(content).forEach(item=>{const $item=$(item),cls=$item.attr('class'),style=$item.attr('style'),text=$item.html();if($item.is('a')){const text=$item.text().trim(),href=$item.attr('href');tmpl+=`<a href=\"https://flowus.cn/${ href }\"target=\"_blank\">${text}</a>`}if(cls=='_23v5d0 _1p2ly5v'&&!style){tmpl+=`<span>${text}</span>`}if(cls=='_23v5d0 _1p2ly5v'&&style&&style.includes('line-through')){tmpl+=`<strike>${text}</strike>`}if(cls=='_23v5d0 _1p2ly5v'&&style&&style.includes('italic')){tmpl+=`<i>${text}</i>`}if(cls=='rounded-sm text-[0.8125em] p-1 mx-[2px] code-inline-color'){tmpl+=`<code>${text}</code>`}if(cls=='_16ceglb _23v5d0 _1p2ly5v'){tmpl+=`<b>${text}</b>`}if(cls=='_1w8t1hc _23v5d0 _1p2ly5v'){tmpl+=`<u>${text}</u>`}});return tmpl},block=item=>{const $target=$(item),cls=($target.attr('class')||'').replace('hide-sync-block-child','').trim(),content=$target.find('div[contenteditable]').html();if(cls=='relative cursor-text w-full my-px'){html+=`<p>${inlineBlock(content)}</p>`}if(cls=='relative cursor-text py-1 my-px w-full pr-2'){html+=`<sr-blockquote>${content}</sr-blockquote>`}if(cls.includes('relative cursor-text w-full heading')){if(cls.includes('mt-[25px]'))html+=`<h1>${content}</h1>`;if(cls.includes('mt-[15px]'))html+=`<h2>${content}</h2>`;if(cls.includes('my-2'))html+=`<h3>${content}</h3>`;if(cls.includes('my-px'))html+=`<h4>${content}</h4>`}if(cls=='relative'&&$target.children().length==1&&$($target.children()[0]).attr('class').includes('relative cursor-text w-full my-px')){html+=`<ul><li>${inlineBlock($target.find('div[contenteditable]').html())}</li></ul>`}if(cls.includes('relative cursor-text my-2.5 group')){html+=`<img src=\"${ $target.find( 'img:first' ).attr('src') }\"/>`}if(cls=='relative cursor-text w-full my-1 rounded group bg-grey8'){let code='';$target.find('.CodeMirror-code pre').map((_,item)=>{code+=item.innerText+'\\n'});html+=`<pre>${code}</pre>`}if(cls=='relative cursor-text w-full my-2'){const text=$target.find('a').text().trim(),href=$target.find('a').attr('href');html+=`<sr-deeplink><a href=\"https://flowus.cn/${ href }\"target=\"_blank\">${text}</a></sr-deeplink>`}if(cls=='relative'&&$target.children().length==1&&$($target.children()[0]).attr('class').includes('relative cursor-text w-full my-1 rounded line-default')){const text=$target.find('.text-ellipsis.text-t2').text().trim(),href=$target.find('a').attr('href');html+=`<sr-deeplink><a href=\"${ href }\"target=\"_blank\">${text}</a></sr-deeplink>`}if(cls=='relative cursor-text w-full py-1'){$($(item).children()[0]).children().map((_,child)=>{block(child)})}};block(item)});return html})()}]]",
"name": "flowus.cn",
"title": "<title>",
"url": "https://flowus.cn/**",
"avatar": [
{
"name": ""
},
{
"url": ""
}
],
"paging": [
{
"prev": ""
},
{
"next": ""
}
]
}
安装当前站点