导入-加密

https://Jinjia.cctv/daoru

分享者: jiajunjin (10775)发布时间: 2天前

该用户很懒,什么介绍也没有写!
二维码导入
{
    "articleStyle": 0,
    "cacheFirst": false,
    "customOrder": 0,
    "enableJs": true,
    "enabled": true,
    "enabledCookieJar": false,
    "lastUpdateTime": 1784613093465,
    "loadWithBaseUrl": true,
    "preload": false,
    "showWebLog": true,
    "singleUrl": false,
    "sourceIcon": "https:\/\/gitee.com\/lyc486\/yuedu\/raw\/master\/drtb.gif",
    "sourceName": "导入-加密",
    "sourceUrl": "https:\/\/Jinjia.cctv\/daoru",
    "startHtml": "<!DOCTYPE html>\n<html lang=\"zh-CN\">\n<head>\n    <meta charset=\"utf-8\">\n    <title>阅读导入-整合增强版<\/title>\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, user-scalable=no\">\n    <meta name=\"description\" content=\"书源\/订阅源\/净化\/字典导入,链接净化、口令加解密、Base64解析、历史记录,Ciallo~☆  (∠・ω< )⌒★\">\n    <link href=\"https:\/\/fonts.googleapis.com\/css2?family=ZCOOL+KuaiLe&display=swap\" rel=\"stylesheet\">\n    <link href=\"https:\/\/cdn.jsdelivr.net\/npm\/remixicon@4.2.0\/fonts\/remixicon.css\" rel=\"stylesheet\">\n<\/head>\n<body>\n    <div class=\"wrap-card\">\n        <div id=\"toast-box\" class=\"toast\"><\/div>\n        <h2 class=\"page-title\">Ciallo~☆  (∠・ω< )⌒★<\/h2>\n        <div class=\"config-row\">\n            <div class=\"cfg-item\">\n                <label>资源类型<\/label>\n                <select id=\"typeSelect\">\n                    <option value=\"SY\">SY书源<\/option>\n                    <option value=\"DY\">DY订阅源<\/option>\n                    <option value=\"ZD\">ZD字典规则<\/option>\n                    <option value=\"JH\">JH替换规则<\/option>\n                    <option value=\"ML\">ML目录规则<\/option>\n                    <option value=\"LD\">LD朗读规则<\/option>\n                <\/select>\n            <\/div>\n            <div class=\"cfg-item\">\n                <label>有效期<\/label>\n                <div class=\"radio-group\">\n                    <label class=\"radio-label\"><input type=\"radio\" name=\"expire\" value=\"0\" checked>永久<\/label>\n                    <label class=\"radio-label\"><input type=\"radio\" name=\"expire\" value=\"7\">7天<\/label>\n                    <label class=\"radio-label\"><input type=\"radio\" name=\"expire\" value=\"30\">30天<\/label>\n                <\/div>\n            <\/div>\n        <\/div>\n        <div class=\"input-wrap\">\n            <textarea id=\"srcText\" rows=\"4\" placeholder=\"粘贴链接\/加密口令\/Base64内容\"><\/textarea>\n            <textarea id=\"resultText\" rows=\"4\" placeholder=\"净化\/解密\/加密结果输出区\" readonly><\/textarea>\n        <\/div>\n        <div class=\"btn-bar\">\n            <button class=\"func-btn\" id=\"btnClear\" title=\"点击清空输入框|长按800ms清空全部历史\">\n                <i class=\"ri-delete-bin-line\"><\/i>\n            <\/button>\n            <button class=\"func-btn\" id=\"btnPurify\" title=\"一键净化&解密口令\">\n                <i class=\"ri-magic-line\"><\/i>\n            <\/button>\n            <button class=\"func-btn\" id=\"btnEncode\" title=\"将纯净链接生成加密口令(永久有效)\">\n                <i class=\"ri-lock-password-line\"><\/i>\n            <\/button>\n            <button class=\"func-btn\" id=\"btnCopy\" title=\"复制处理后的内容\">\n                <i class=\"ri-file-copy-line\"><\/i>\n            <\/button>\n            <button class=\"func-btn\" id=\"btnImport\" title=\"唤起Legado导入\">\n                <i class=\"ri-share-forward-line\"><\/i>\n            <\/button>\n        <\/div>\n        <div class=\"history-title\">导入历史(点击回填)<\/div>\n        <div id=\"historyBox\" class=\"history-list\"><\/div>\n    <\/div>\n<\/body>\n<\/html>",
    "startJs": "(function(){const toastDom=document.getElementById('toast-box');const srcText=document.getElementById('srcText');const resultText=document.getElementById('resultText');const btnClear=document.getElementById('btnClear');const btnPurify=document.getElementById('btnPurify');const btnEncode=document.getElementById('btnEncode');const btnCopy=document.getElementById('btnCopy');const btnImport=document.getElementById('btnImport');const historyBox=document.getElementById('historyBox');const typeSelect=document.getElementById('typeSelect');const expireRadios=document.querySelectorAll('input[name=\"expire\"]');let longPressTimer=null;const typeMap={SY:\"bookSource\",DY:\"rssSource\",ZD:\"dictRule\",JH:\"replaceRule\",ML:\"textTocRule\",LD:\"httpTTS\"};function showToast(msg,delay=2200){toastDom.textContent=msg;toastDom.classList.add('show');clearTimeout(toastDom._t);toastDom._t=setTimeout(()=>toastDom.classList.remove('show'),delay);}function btnAnim(el){el.classList.add('an-shake');setTimeout(()=>el.classList.remove('an-shake'),500);}const isEmpty=s=>!s||\/^\\s*$\/.test(s);const encodeMap=new Map([[\"https:\/\/\",[\"#L:\"]],[\".\",[\"电\",\"店\",\"垫\",\"殿\",\"。\"]],[\"%\",[\"白\",\"百\",\"拜\",\"摆\",\"💯\"]],[\"\/\",[\"杠\",\"刚\",\"钢\",\"岗\",\"🎹\"]],[\"zip\",[\"压\",\"亚\",\"呀\",\"牙\",\"🦆\"]],[\"json\",[\"串\",\"穿\",\"船\",\"传\",\"🚢\"]],[\"4\",[\"四\",\"是\",\"时\",\"丝\",\"🕓\"]],[\"5\",[\"五\",\"武\",\"误\",\"勿\",\"🕔\"]],[\"6\",[\"六\",\"刘\",\"留\",\"陆\",\"🕕\"]],[\"0\",[\"零\",\"另\",\"玲\",\"灵\",\"⏰\"]],[\"com\",[\"🛜1\",\"🌐1\",\"🌏1\"]],[\"cn\",[\"🛜2\",\"🌐2\",\"🌏2\"]],[\"net\",[\"🛜3\",\"🌐3\",\"🌏3\"]],[\"org\",[\"🛜7\",\"🌐7\",\"🌏7\"]],[\"xyz\",[\"🛜8\",\"🌐8\",\"🌏8\"]],[\"me\",[\"🛜9\",\"🌐9\",\"🌏9\"]]]);const decodeMap=new Map();encodeMap.forEach((vals,key)=>vals.forEach(char=>decodeMap.set(char,key)));const seedRandom=seed=>{const x=Math.sin(seed++)*10000;return x-Math.floor(x);};function cleanInvisible(str){return str.replace(\/[\\u200B-\\u200F\\uFEFF\\x00-\\x1F\\x7F-\\x9F]\/g,\"\").replace(\/ \/g,\" \");}function deepUrlDecode(str){let val=str;for(let i=0;i<10;i++){try{val=decodeURIComponent(val)}catch{break}}return val;}function safeB64Decode(str){try{if(str.startsWith('data:')){const m=str.match(\/^[^,]+,([^\\s,]+)\/);if(m?.[1])return atob(m[1]);}if(\/^[A-Za-z0-9+\/]{2,}=*$\/i.test(str))return atob(str);return str;}catch{return str}}function fullUrlPurify(raw){if(isEmpty(raw))return '';let txt=cleanInvisible(raw).replace(\/\\s+\/g,' ').trim();const linkMatch=txt.match(\/https?:\\\/\\\/[^\\s]+\/gi);if(linkMatch)txt=deepUrlDecode(linkMatch[0]).replace(\/[)}\\\\]>」】〗』〕〉》\\s]+$\/,'');txt=txt.replace(\/[abphm]站\/g,\"\").replace(\/[\\s,。?!;…“‘、’”]+$\/,'').replace(\/(\\p{Emoji_Presentation}|\\p{Emoji}[\\uFE0F\\u200d]+)|\\[(酷币|受虐滑稽|微笑|哈哈哈|呵呵|呲牙|可爱|可怜|皱眉|惊讶|坏笑|流泪|抱拳|色|强|doge笑哭|doge原谅ta|旺财|OK)\\]\/giu,\"\").replace(\/(\\\/.+\\.(json|txt|zip))[\\s\\S]*$\/,'$1').replace(\/&\/g,\"%26\");return txt;}function parseShibboleth(text){const yuanPos=text.indexOf('¥');let mainStr=yuanPos>-1?text.slice(0,yuanPos):text;if(!mainStr.includes('复制口令到阅读导入')){return {url:text, type:null};}const start=mainStr.indexOf('#L:');const splitMark=mainStr.indexOf('!',start);let codeStr=splitMark>0?mainStr.slice(start,splitMark):mainStr.slice(start);let pwdType=null;const typeMatch=codeStr.match(\/^#L:(SY|DY|ZD|JH|ML|LD)\/);if(typeMatch){pwdType=typeMatch[1];codeStr=codeStr.replace(\/^#L:(SY|DY|ZD|JH|ML|LD)\/,\"\");}decodeMap.forEach((origin,mask)=>{while(codeStr.includes(mask))codeStr=codeStr.replace(mask,origin);});if(splitMark>0){const stampPos=mainStr.indexOf('©',splitMark);if(stampPos>0){const stampNum=parseInt(mainStr.slice(stampPos+1).trim(),10);if(!isNaN(stampNum)&&stampNum!==0){const realStamp=stampNum*1000;if(realStamp<Date.now())showToast('该口令已过期失效');}}}return {url:codeStr,type:pwdType};}function getFinalContent(rawText){if(isEmpty(rawText))return '';const parseRes=parseShibboleth(rawText);let originUrl=parseRes.url;originUrl=safeB64Decode(originUrl);return fullUrlPurify(originUrl);}window.genShibboleth=function(){const input=srcText.value.trim();if(isEmpty(input))return showToast('请填入需要加密的纯净链接');const curType=typeSelect.value;let expireDay=0;expireRadios.forEach(r=>{if(r.checked)expireDay=Number(r.value);});const sortedKeys=Array.from(encodeMap.keys()).sort((a,b)=>b.length-a.length);let seed=Date.now(),buf=[],idx=0;while(idx<input.length){let hitKey=null,hitLen=0;for(const k of sortedKeys){if(input.startsWith(k,idx)&&k.length>hitLen){hitKey=k;hitLen=k.length;}}if(hitKey){const arr=encodeMap.get(hitKey);buf.push(arr[Math.floor(seedRandom(seed++)*arr.length)]);idx+=hitLen;}else{buf.push(input[idx++]);}}let expireStamp=0;if(expireDay>0){expireStamp=Math.floor((Date.now()+expireDay*24*3600*1000)\/1000);}const passText=`复制口令到阅读导入#L:${curType}${buf.join('')}!sy©${expireStamp}¥JinJia^`;resultText.value=passText;btnAnim(btnEncode);showToast('加密口令生成完成');};window.purify=function(){const res=getFinalContent(srcText.value);if(isEmpty(res))return showToast('未解析出有效链接内容');resultText.value=res;btnAnim(btnPurify);showToast('净化解密成功');};window.cleart=function(){srcText.value='';resultText.value='';btnAnim(btnClear);showToast('输入框已清空');};window.copyProcessed=function(){const copyVal=resultText.value.trim();if(isEmpty(copyVal))return showToast('暂无内容可复制');try{const tempArea=document.createElement('textarea');tempArea.style.cssText='position:fixed;left:-9999px;top:-9999px';tempArea.value=copyVal;document.body.appendChild(tempArea);tempArea.select();const copyOk=document.execCommand('copy');document.body.removeChild(tempArea);if(copyOk){btnAnim(btnCopy);showToast('复制成功');}else showToast('复制失败,请手动复制');}catch{showToast('复制异常,手动复制下方文本')}};window.importContent=function(){resultText.value = '';const rawInput = srcText.value.trim();const parseRes = parseShibboleth(rawInput);const targetUrl = getFinalContent(rawInput);resultText.value = targetUrl;btnAnim(btnImport);if(isEmpty(targetUrl)) return showToast('无可用导入链接');if(!\/^https?:\\\/\\\/\/i.test(targetUrl)) return showToast('解析结果不是合法网页链接');let historyList=JSON.parse(localStorage.getItem('importHistory')||'[]');historyList=historyList.filter(item=>item!==targetUrl);historyList.push(targetUrl);if(historyList.length>20)historyList=historyList.slice(-20);localStorage.setItem('importHistory',JSON.stringify(historyList));renderHistory();const encodeUrl=encodeURIComponent(targetUrl);let scheme = parseRes.type ? (typeMap[parseRes.type] || \"Source\") : \"Source\";try{window.location.href=`legado:\/\/import\/${scheme}?src=${encodeUrl}`;showToast('已唤起Legado导入窗口');}catch(err){showToast('导入唤起失败: '+err.message)}};function renderHistory(){const list=JSON.parse(localStorage.getItem('importHistory')||'[]');if(list.length===0){historyBox.innerHTML='<div class=\"empty-hint\">暂无导入历史记录<\/div>';return;}historyBox.innerHTML=list.reverse().map(item=>`<div class=\"history-item\" data-val=\"${encodeURIComponent(item)}\">${item}<\/div>`).join('');document.querySelectorAll('.history-item').forEach(dom=>{dom.onclick=()=>{srcText.value=decodeURIComponent(dom.dataset.val);resultText.value='';showToast('历史内容已回填');}})}btnClear.addEventListener('pointerdown',()=>{longPressTimer=setTimeout(()=>{localStorage.removeItem('importHistory');renderHistory();showToast('所有历史记录已清空');},800);});const cancelLong=()=>clearTimeout(longPressTimer);btnClear.addEventListener('pointerup',cancelLong);btnClear.addEventListener('pointercancel',cancelLong);btnClear.onclick=cleart;btnPurify.onclick=purify;btnEncode.onclick=genShibboleth;btnCopy.onclick=copyProcessed;btnImport.onclick=importContent;window.onload=renderHistory;})();",
    "startStyle": ":root {\n    --bg-light: #fffbf0;\n    --bg-dark: #1a1a1a;\n    --card-light: #ffffff;\n    --card-dark: #242424;\n    --text-light: #222222;\n    --text-dark: #eeeeee;\n    --border-light: rgba(76, 175, 80, 0.35);\n    --border-dark: rgba(76, 175, 80, 0.25);\n    --accent: #4caf50;\n    --danger: #af4c50;\n    --primary-blue: #4c50af;\n    --shadow: 0 2px 12px rgba(0,0,0,0.08);\n    --radius: 10px;\n    --anim-speed: 0.2s ease;\n}\n@media (prefers-color-scheme: dark) {\n    :root {\n        --bg: var(--bg-dark);\n        --card-bg: var(--card-dark);\n        --text: var(--text-dark);\n        --border: var(--border-dark);\n    }\n}\n@media (prefers-color-scheme: light) {\n    :root {\n        --bg: var(--bg-light);\n        --card-bg: var(--card-light);\n        --text: var(--text-light);\n        --border: var(--border-light);\n    }\n}\n* {\n    margin: 0;\n    padding: 0;\n    box-sizing: border-box;\n    -webkit-tap-highlight-color: transparent;\n}\nbody {\n    background-color: var(--bg);\n    color: var(--text);\n    font-family: 'ZCOOL KuaiLe', system-ui, sans-serif;\n    min-height: 100vh;\n    padding: 20px 12px;\n    display: flex;\n    justify-content: center;\n}\n.wrap-card {\n    width: 100%;\n    max-width: 460px;\n    display: flex;\n    flex-direction: column;\n    gap: 16px;\n    position: relative;\n}\n.config-row {\n    display: flex;\n    gap: 12px;\n    flex-wrap: wrap;\n}\n.cfg-item {\n    flex: 1;\n    min-width: 180px;\n    display: flex;\n    flex-direction: column;\n    gap: 6px;\n}\n.cfg-item label {\n    font-size: 13px;\n    opacity: 0.8;\n}\n#typeSelect {\n    padding: 8px 10px;\n    border-radius: var(--radius);\n    border: 2px solid var(--border);\n    background: var(--card-bg);\n    color: var(--text);\n    outline: none;\n}\n.radio-group {\n    display: flex;\n    gap: 8px;\n}\n.radio-label {\n    font-size: 13px;\n    display: flex;\n    align-items: center;\n    gap: 4px;\n}\n.toast {\n    position: fixed;\n    top: 24px;\n    right: 16px;\n    padding: 6px 12px;\n    background: rgba(0,0,0,0.65);\n    color: #fff;\n    border-radius: 6px;\n    font-size: 13px;\n    opacity: 0;\n    transition: opacity var(--anim-speed);\n    pointer-events: none;\n    z-index: 99;\n    max-width: 65%;\n    word-break: break-all;\n}\n.toast.show { opacity: 1; }\n.page-title {\n    text-align: center;\n    font-size: 1.4rem;\n    font-weight: normal;\n}\n.input-wrap {\n    display: flex;\n    flex-direction: column;\n    gap: 12px;\n    width: 100%;\n}\ntextarea {\n    width: 100%;\n    font-size: 14px;\n    color: var(--text);\n    padding: 10px;\n    background: rgba(76, 175, 80, 0.08);\n    border: 2px solid var(--border);\n    border-radius: var(--radius);\n    resize: none;\n    outline: none;\n    transition: all var(--anim-speed);\n}\ntextarea:focus {\n    border-color: var(--accent);\n    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);\n}\ntextarea[readonly] { background: rgba(76, 175, 80, 0.04); }\n.btn-bar {\n    display: flex;\n    gap: 10px;\n    justify-content: center;\n    flex-wrap: wrap;\n}\n.func-btn {\n    width: 44px;\n    height: 44px;\n    border-radius: 50%;\n    border: none;\n    background: transparent;\n    color: var(--text);\n    font-size: 1.25rem;\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    cursor: pointer;\n    transition: transform 0.2s;\n}\n.func-btn:active { transform: scale(0.85); }\n.func-btn:hover { color: var(--accent); }\n.func-btn.an-shake { animation: shake 0.5s ease; }\n@keyframes shake {\n    0% { transform: scale(0.85); }\n    100% { transform: scale(1); }\n}\n.history-title {\n    font-size: 14px;\n    opacity: 0.75;\n    margin-top: 4px;\n}\n.history-list {\n    display: flex;\n    flex-direction: column;\n    gap: 8px;\n}\n.history-item {\n    font-size: 13px;\n    padding: 6px 10px;\n    border-radius: var(--radius);\n    background: rgba(75, 175, 175, 0.22);\n    word-break: break-all;\n    cursor: pointer;\n    transition: background 0.2s;\n}\n.history-item:active { background: rgba(75, 175, 175, 0.35); }\n.empty-hint {\n    font-size: 13px;\n    color: #888;\n    padding: 4px;\n}",
    "type": 0
}
广告