Fix deleted feed

This commit is contained in:
the1812 2020-07-19 14:36:29 +08:00
parent 0d422efa0a
commit a9c46ce849
10 changed files with 29 additions and 33 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -58,13 +58,11 @@
"danmaku-send-bar.min.css": "52149D46CF3A15CF6EB186CB49F298DE18B0723E52D8693228F66099847EDCCB",
"danmaku-send-bar.min.js": "7108E72F00C169F26E20409F4AA79F05553310375BABC392EB7E2166224B800A",
"dark.min.css": "53FC0A641292561F4F453D3FD83C37616B513D36C0974AAE167897D8658FCE3E",
"dark.user.css": "A560D42416094208940E9C7731D9E6B4F87AC7AE903FDDF791F9DFE292BDC896",
"dark.user.css": "5C5678B5C306F33D728F89435667E37E1F8F7274BDB29FCA83B7B8BFA5500C50",
"dark-color-scheme.min.js": "6D353AC738180317ACF9D2E046BFFBA0ACC0FA7A8D22B8E16C51127CDE4FE96B",
"dark-important.min.css": "5369385A2C16188FB11E71C4C5B91275646F22F0F09E518E37813CC4FA23A072",
"dark-navbar.min.css": "7FAD547E326B768904B3739C978DF86FFDDD5E5064FB8F490710D197CCC3018B",
"dark-schedule.min.js": "853C446547603F4F0425F19F09F73335C9EC451A790C1C07E5E5B88A09E9B453",
"dark-slice-11.min.css": "82AE8AF20CF61F8F1A9A3E4599DC9497538A5FB76087E48FBB0B166B4B626A6C",
"dark-slice-12.min.css": "3EABCB98A96C7270F66D137D31F13FE4FC8625A70FDD2C5AB24C1D18C404749C",
"dark-styles.min.js": "77F12E4F159C5139E1FC6030615F88EFD0A02443D34C3C4EDC3DB0B85F081631",
"debounce.min.js": "54D33E1273C1F3FE19550BF1844339C3D54D6B01DF8A39C3162D95B93B079CFA",
"default-danmaku-settings.min.css": "D9942B184FEDA7B08CFA0C34920E97D7A83B81762DCBF757642EBB60F95FF25D",
@ -74,7 +72,7 @@
"default-player-mode.min.js": "3DF0FE367EB990B018C57C1B73BB82CE38FF0631D4C329051F3FD9F4D504071D",
"default-video-quality.min.js": "A24225E0F72D5BCA7DFE529E5B90B03F494C8720ADEF91D466A923FD767EB907",
"default-video-speed.min.js": "EBBF43D8013E32AC13C3E9396480574DDC549BA8BC7CCF15FE4EEF2DFEF64F33",
"disable-feeds-details.min.js": "EBFB35D828BC55BD366D4F3B1B2C3753B1E7B756FF0AEBCB0ED790C2D5FE785D",
"disable-feeds-details.min.js": "AE090C4ED283091F464B7B1509980DBDEF3FD72348AF35826603D418AF6048A4",
"disable-profile-popup.min.js": "69901EC9A3D15D585F61B1370DC69003CE5869499CAC9C57A03B24511F338A2D",
"double-click-fullscreen.min.js": "C6D95B92ECDE67F2C0A3C6B6E4DC655C524F6A98CE0D48733ADCE4ABA780A47B",
"download-audio.min.js": "1F4536DE4FF302BFD026CA17E028AF8EB037FB6D0CB355692549DECAEAE0E8C9",
@ -92,7 +90,7 @@
"extend-feeds-live.min.css": "3C22AA3BA22548D09BCE693DB4DBCB016C62C329CFB3115D6D33808798F26253",
"extend-feeds-live.min.js": "AC4C8018F5597536501DC8450F1572D6CF9D417229B84D2FE9A0F32E18942ED6",
"favorites-redirect.min.js": "70D6ECCE0402AA76387D2A3288C1148C60CC88D5378B7A2BDC813F3F78E4EE84",
"feeds-apis.min.js": "CE3724D1D9A89C8B3A6A9134B98DCAB51CA1BF13A4DCEF18AAF084464F44FFD4",
"feeds-apis.min.js": "A4933495BC4796B4EA00E66612A3196BD96E66EEAEFAB232D5E72BDFCC071CF0",
"feeds-filter.min.js": "9E8BC1A669D97992E888A3154FCE64912CE0B7A303D6BE40C3CA0C71A9533B96",
"feeds-filter-card.vue.min.js": "E995F9C93BA50983AAAFB2DE45848769C78FC0E39A34655FA98586DFE670670B",
"feeds-translate.min.css": "704EF1AAE13C4F7D33244E0EC30069AE449C4DBA0310E94C6A6B6ECC33570E5E",

Binary file not shown.

View File

@ -1 +1 @@
(()=>{return(t,e)=>{let n=true;const i="disable-feeds-details-style";const a=`\n.card[data-did] .content { cursor: text }\n.card[data-did] .content .details {\n font-size: 12px;\n opacity: 0.6;\n cursor: pointer;\n display: block;\n}\n`;e.applyImportantStyleFromText(".card[data-did] .content .details { display: none }","disable-feeds-details-init-style");const s=()=>e.applyImportantStyleFromText(a,i);const r=document.URL.replace(location.search,"");const c=r.startsWith("https://t.bilibili.com/")||r.startsWith("https://space.bilibili.com/");(async()=>{if(!c){return}s();const{feedsCardsManager:t,feedsCardTypes:i}=await e.importAsync("feeds-apis");const a=await t.startWatching();if(!a){console.error("feedsCardsManager.startWatching() failed");return}const r=t=>{const e=t.element;e.addEventListener("click",t=>{if(t.ctrlKey||!n){return}const i=dqa(e,".content");const a=t.target;if(a.hasAttribute("click-title")){return}if(i.some(t=>t===a||t.contains(a))){t.stopImmediatePropagation()}},{capture:true});const i=dq(e,".post-content");if(!i){return}if(dq(i,".video-container")||dq(i,".bangumi-container")){return}if(dq(i,".details")){return}if(i.classList.contains("repost")){const t=dq(i,".content");const e=document.createElement("div");e.classList.add("details");e.setAttribute("click-title","详情");e.innerHTML=`\n 详情<i class="mdi mdi-chevron-right" click-title></i>\n`;t.insertAdjacentElement("beforeend",e)}};t.cards.forEach(r);t.addEventListener("addCard",t=>{const e=t.detail;r(e)})})();return{reload:()=>{if(c){s();n=true}},unload:()=>{if(c){const t=document.getElementById(i);t&&t.remove();n=false}}}}})();
(()=>{return(t,e)=>{let n=true;const i="disable-feeds-details-style";const a=`\n.card[data-did] .content { cursor: text }\n.card[data-did] .content .details {\n font-size: 12px;\n opacity: 0.6;\n cursor: pointer;\n display: block;\n}\n`;e.applyImportantStyleFromText(".card[data-did] .content .details { display: none }","disable-feeds-details-init-style");const s=()=>e.applyImportantStyleFromText(a,i);const r=document.URL.replace(location.search,"");const c=r.startsWith("https://t.bilibili.com/")||r.startsWith("https://space.bilibili.com/");(async()=>{if(!c){return}s();const{feedsCardsManager:t,feedsCardTypes:i}=await e.importAsync("feeds-apis");const a=await t.startWatching();if(!a){console.error("feedsCardsManager.startWatching() failed");return}const r=t=>{const e=t.element;e.addEventListener("click",t=>{if(t.ctrlKey||!n){return}const i=dqa(e,".content");const a=t.target;if(a.hasAttribute("click-title")){return}if(i.some(t=>t===a||t.contains(a))){t.stopImmediatePropagation()}},{capture:true});const i=dq(e,".post-content");if(!i){return}if(dq(i,".video-container")||dq(i,".bangumi-container")){return}if(dq(i,".details")){return}if(i.classList.contains("repost")){const t=dq(i,".content");if(!t){return}const e=document.createElement("div");e.classList.add("details");e.setAttribute("click-title","详情");e.innerHTML=`\n 详情<i class="mdi mdi-chevron-right" click-title></i>\n`;t.insertAdjacentElement("beforeend",e)}};t.cards.forEach(r);t.addEventListener("addCard",t=>{const e=t.detail;r(e)})})();return{reload:()=>{if(c){s();n=true}},unload:()=>{if(c){const t=document.getElementById(i);t&&t.remove();n=false}}}}})();

File diff suppressed because one or more lines are too long

View File

@ -59,6 +59,9 @@ const enable = url.startsWith('https://t.bilibili.com/') ||
}
if (postContent.classList.contains('repost')) {
const contents = dq(postContent, '.content') as HTMLElement
if (!contents) {
return
}
const details = document.createElement('div')
details.classList.add('details')
details.setAttribute('click-title', '详情')

View File

@ -196,6 +196,9 @@ class FeedsCardsManager extends EventTarget {
console.warn(el)
return ''
}
if (!el.__vue__.card.origin) {
return ''
}
if (type === feedsCardTypes.repost) {
const originalCard = JSON.parse(el.__vue__.card.origin)
const originalText = el.__vue__.originCardData.pureText