diff options
| author | Claude <noreply@anthropic.com> | 2026-02-28 16:19:50 +0000 |
|---|---|---|
| committer | Claude <noreply@anthropic.com> | 2026-02-28 16:19:50 +0000 |
| commit | 4ec762350c9bc0704bb81357949f910124fac0c6 (patch) | |
| tree | 63cb4bab92900790815d443250adc647b5ae351d /web | |
| parent | 474a93374340fa3aa5997b66ac1fecbffa620375 (diff) | |
| download | neko-claude/fix-mobile-scrolling-Ls0Fr.tar.gz neko-claude/fix-mobile-scrolling-Ls0Fr.tar.bz2 neko-claude/fix-mobile-scrolling-Ls0Fr.zip | |
Remove scrape/text button that caused squished body textclaude/fix-mobile-scrolling-Ls0Fr
The float:right "text" button inside .dateline was causing .item-description
content to wrap around it when .feed-item gained overflow:hidden. Removing
the button fixes the squished text regression. The backend scrape endpoint
and scrapeItem() handler remain intact for potential future use.
https://claude.ai/code/session_0141nhxmYfoFPVPZ813K1XFD
Diffstat (limited to 'web')
| -rw-r--r-- | web/dist/v3/assets/index-BwswC14C.js (renamed from web/dist/v3/assets/index-C5kv_3He.js) | 13 | ||||
| -rw-r--r-- | web/dist/v3/index.html | 2 |
2 files changed, 4 insertions, 11 deletions
diff --git a/web/dist/v3/assets/index-C5kv_3He.js b/web/dist/v3/assets/index-BwswC14C.js index a8b9e39..8a534a2 100644 --- a/web/dist/v3/assets/index-C5kv_3He.js +++ b/web/dist/v3/assets/index-BwswC14C.js @@ -13,13 +13,6 @@ ${t} ${e.feed_title?` - ${e.feed_title}`:""} </a> - <div class="item-actions" style="display: inline-block; float: right;"> - ${e.full_content?"":` - <button class="scrape-btn" title="Load Full Content" data-action="scrape"> - text - </button> - `} - </div> </div> ${e.full_content||e.description?` <div class="item-description"> @@ -88,12 +81,12 @@ ${i.title||i.url} </a> </li> - `).join(""))}function R(){}function _(){const{filter:e}=a,t=document.getElementById("filter-list");t&&t.querySelectorAll("li").forEach(n=>{n.classList.toggle("active",n.getAttribute("data-filter")===e)})}function S(){const{items:e,loading:t}=a,n=document.getElementById("content-area");if(!n||d.getCurrentRoute().path==="/settings")return;if(t&&e.length===0){n.innerHTML='<p class="loading">Loading items...</p>';return}if(e.length===0){n.innerHTML='<p class="empty">No items found.</p>';return}n.innerHTML=` + `).join(""))}function R(){}function A(){const{filter:e}=a,t=document.getElementById("filter-list");t&&t.querySelectorAll("li").forEach(n=>{n.classList.toggle("active",n.getAttribute("data-filter")===e)})}function S(){const{items:e,loading:t}=a,n=document.getElementById("content-area");if(!n||d.getCurrentRoute().path==="/settings")return;if(t&&e.length===0){n.innerHTML='<p class="loading">Loading items...</p>';return}if(e.length===0){n.innerHTML='<p class="empty">No items found.</p>';return}n.innerHTML=` <ul class="item-list"> ${e.map(s=>q(s)).join("")} </ul> ${a.hasMore?'<div id="load-more-sentinel" class="loading-more">Loading more...</div>':""} - `;const i=document.getElementById("main-content");if(i){let s=null;const o=()=>{!a.loading&&a.hasMore&&i.scrollHeight>i.clientHeight&&i.scrollHeight-i.scrollTop-i.clientHeight<200&&w(),s===null&&(s=window.setTimeout(()=>{A(i),s=null},250))};i.onscroll=o,window.onscroll=o}}function A(e){const n=(e||document.getElementById("main-content")||document.documentElement).getBoundingClientRect();y("checkReadItems start",{containerTop:n.top});const i=document.querySelectorAll(".feed-item.unread");for(const s of i){const o=s.getAttribute("data-id");if(!o)continue;const r=parseInt(o);if(a.items.find(c=>c._id===r)?.read)continue;const u=s.getBoundingClientRect(),l=u.bottom<n.top+5;L&&y(`Item ${r} check`,{rectBottom:u.bottom,containerTop:n.top,isPast:l}),l&&(y(`Marking as read (scrolled past): ${r}`),p(r,{read:!0}))}}typeof window<"u"&&setInterval(()=>{const e=document.getElementById("main-content");if(e&&A(e),a.loading||!a.hasMore)return;if(e&&e.scrollHeight>e.clientHeight&&e.scrollHeight-e.scrollTop-e.clientHeight<200){w();return}const t=document.documentElement.scrollHeight||document.body.scrollHeight,n=window.innerHeight,i=window.scrollY||document.documentElement.scrollTop;t>n&&t-n-i<200&&w()},1e3);function v(){const e=document.getElementById("content-area");if(!e)return;e.innerHTML=` + `;const i=document.getElementById("main-content");if(i){let s=null;const o=()=>{!a.loading&&a.hasMore&&i.scrollHeight>i.clientHeight&&i.scrollHeight-i.scrollTop-i.clientHeight<200&&w(),s===null&&(s=window.setTimeout(()=>{_(i),s=null},250))};i.onscroll=o,window.onscroll=o}}function _(e){const n=(e||document.getElementById("main-content")||document.documentElement).getBoundingClientRect();y("checkReadItems start",{containerTop:n.top});const i=document.querySelectorAll(".feed-item.unread");for(const s of i){const o=s.getAttribute("data-id");if(!o)continue;const r=parseInt(o);if(a.items.find(c=>c._id===r)?.read)continue;const u=s.getBoundingClientRect(),l=u.bottom<n.top+5;L&&y(`Item ${r} check`,{rectBottom:u.bottom,containerTop:n.top,isPast:l}),l&&(y(`Marking as read (scrolled past): ${r}`),p(r,{read:!0}))}}typeof window<"u"&&setInterval(()=>{const e=document.getElementById("main-content");if(e&&_(e),a.loading||!a.hasMore)return;if(e&&e.scrollHeight>e.clientHeight&&e.scrollHeight-e.scrollTop-e.clientHeight<200){w();return}const t=document.documentElement.scrollHeight||document.body.scrollHeight,n=window.innerHeight,i=window.scrollY||document.documentElement.scrollTop;t>n&&t-n-i<200&&w()},1e3);function v(){const e=document.getElementById("content-area");if(!e)return;e.innerHTML=` <div class="settings-view"> <h2>Settings</h2> @@ -186,4 +179,4 @@ </ul> </section> </div> - `,document.getElementById("theme-options")?.addEventListener("click",i=>{const s=i.target.closest("button");s&&(a.setTheme(s.getAttribute("data-theme")),v())}),document.getElementById("style-theme-options")?.addEventListener("click",i=>{const s=i.target.closest("button");s&&a.setStyleTheme(s.getAttribute("data-style-theme"))}),document.getElementById("heading-font-selector")?.addEventListener("change",i=>{a.setHeadingFontTheme(i.target.value)}),document.getElementById("font-selector")?.addEventListener("change",i=>{a.setFontTheme(i.target.value)}),document.getElementById("add-feed-btn")?.addEventListener("click",async()=>{const i=document.getElementById("new-feed-url"),s=i.value.trim();s&&(await Q(s)?(i.value="",alert("Feed added successfully!"),T()):alert("Failed to add feed."))});let t="opml";const n=document.getElementById("import-file");document.querySelectorAll(".import-btn").forEach(i=>{i.addEventListener("click",s=>{t=s.currentTarget.getAttribute("data-format")||"opml",n.click()})}),n?.addEventListener("change",async i=>{const s=i.target.files?.[0];s&&(await V(s,t)?(alert(`Import (${t}) started! check logs.`),T()):alert("Failed to import.")),n.value=""}),document.querySelectorAll(".delete-feed-btn").forEach(i=>{i.addEventListener("click",async s=>{const o=parseInt(s.target.getAttribute("data-id"));confirm("Delete this feed?")&&(await X(o),await T(),v())})})}async function Q(e){try{return(await m("/api/feed",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:e})})).ok}catch(t){return console.error("Failed to add feed",t),!1}}async function V(e,t){try{const n=new FormData;n.append("file",e),n.append("format",t);const i=document.cookie.split("; ").find(o=>o.startsWith("csrf_token="))?.split("=")[1];return(await fetch("/api/import",{method:"POST",headers:{"X-CSRF-Token":i||""},body:n})).ok}catch(n){return console.error("Failed to import",n),!1}}async function X(e){try{return(await m(`/api/feed/${e}`,{method:"DELETE"})).ok}catch(t){return console.error("Failed to delete feed",t),!1}}async function G(e){const t=a.items.find(n=>n._id===e);t&&p(e,{starred:!t.starred})}async function J(e){if(a.items.find(n=>n._id===e))try{const n=await m(`/api/item/${e}/content`);if(n.ok){const i=await n.json();i.full_content&&p(e,{full_content:i.full_content})}}catch(n){console.error("Failed to fetch full content",n)}}async function p(e,t){const n=String(e);y("updateItem called",n,t);try{if((await m(`/api/item/${n}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})).ok){const s=a.items.find(o=>String(o._id)===n);if(s){Object.assign(s,t);const o=document.querySelector(`.feed-item[data-id="${e}"]`);if(o){if(t.read!==void 0&&(o.classList.toggle("read",t.read),o.classList.toggle("unread",!t.read)),t.starred!==void 0){const r=o.querySelector(".star-btn");r&&(r.classList.toggle("is-starred",t.starred),r.classList.toggle("is-unstarred",!t.starred),r.setAttribute("title",t.starred?"Unstar":"Star"))}t.full_content&&S()}}}}catch(i){console.error("Failed to update item",i)}}async function T(){const e=await m("/api/feed/");if(e.ok){const t=await e.json();a.setFeeds(t)}}async function W(){const e=await m("/api/tag");if(e.ok){const t=await e.json();a.setTags(t)}}async function E(e,t,n=!1){a.setLoading(!0);try{const i=new URLSearchParams;e&&i.append("feed_id",e),t&&i.append("tag",t),a.searchQuery&&i.append("q",a.searchQuery),(a.filter==="starred"||a.filter==="all")&&i.append("read_filter","all"),a.filter==="starred"&&i.append("starred","true"),n&&a.items.length>0&&i.append("max_id",String(a.items[a.items.length-1]._id));const s=await m(`/api/stream?${i.toString()}`);if(s.ok){const o=await s.json();a.setHasMore(o.length>0),a.setItems(o,n)}}finally{a.setLoading(!1)}}async function w(){const e=d.getCurrentRoute();E(e.params.feedId,e.params.tagName,!0)}async function K(){await m("/api/logout",{method:"POST"}),window.location.href="/login/"}function I(){const e=d.getCurrentRoute(),t=e.query.get("filter");a.setFilter(t||"unread");const n=e.query.get("q");if(n!==null&&a.setSearchQuery(n),e.path==="/settings"){v();return}if(e.path==="/feed"&&e.params.feedId){const i=parseInt(e.params.feedId);a.setActiveFeed(i),E(e.params.feedId),document.getElementById("section-feeds")?.classList.remove("collapsed")}else e.path==="/tag"&&e.params.tagName?(a.setActiveTag(e.params.tagName),E(void 0,e.params.tagName),document.getElementById("section-tags")?.classList.remove("collapsed")):(a.setActiveFeed(null),a.setActiveTag(null),E())}window.addEventListener("keydown",e=>{if(!["INPUT","TEXTAREA"].includes(e.target.tagName))switch(e.key){case"j":k(1);break;case"k":k(-1);break;case"r":if(f){const t=a.items.find(n=>n._id===f);t&&p(t._id,{read:!t.read})}break;case"s":if(f){const t=a.items.find(n=>n._id===f);t&&p(t._id,{starred:!t.starred})}break;case"/":e.preventDefault(),document.getElementById("search-input")?.focus();break}});function k(e){if(a.items.length===0)return;const t=a.items.findIndex(i=>i._id===f);let n;if(t===-1?n=e>0?0:a.items.length-1:n=t+e,n>=0&&n<a.items.length){f=a.items[n]._id;const i=document.querySelector(`.feed-item[data-id="${f}"]`);i&&i.scrollIntoView({block:"start",behavior:"instant"}),a.items[n].read||p(f,{read:!0})}}a.on("feeds-updated",F);a.on("tags-updated",R);a.on("active-feed-updated",F);a.on("active-tag-updated",R);a.on("filter-updated",_);a.on("search-updated",()=>{const e=document.getElementById("search-input");e&&e.value!==a.searchQuery&&(e.value=a.searchQuery),I()});a.on("theme-updated",()=>{g||(g=document.querySelector("#app")),g&&(g.className=`theme-${a.theme} font-${a.fontTheme} heading-font-${a.headingFontTheme}`),document.querySelectorAll(".sidebar-theme-btn").forEach(e=>{e.classList.toggle("active",e.getAttribute("data-theme")===a.theme)}),d.getCurrentRoute().path==="/settings"&&v()});a.on("sidebar-toggle",()=>{const e=document.querySelector(".layout");e&&(a.sidebarVisible?(e.classList.remove("sidebar-hidden"),e.classList.add("sidebar-visible")):(e.classList.remove("sidebar-visible"),e.classList.add("sidebar-hidden")))});a.on("style-theme-updated",()=>{$(a.styleTheme),document.querySelectorAll(".sidebar-style-btn").forEach(e=>{e.classList.toggle("active",e.getAttribute("data-style-theme")===a.styleTheme)}),d.getCurrentRoute().path==="/settings"&&v()});a.on("items-updated",S);a.on("loading-state-changed",S);d.addEventListener("route-changed",I);window.app={navigate:e=>d.navigate(e)};async function Y(){const e=await m("/api/auth");if(!e||e.status===401){window.location.href="/login/";return}U(),$(a.styleTheme),_();try{await Promise.all([T(),W()])}catch(t){console.error("Initial fetch failed",t)}I()}typeof window<"u"&&!window.__VITEST__&&Y(); + `,document.getElementById("theme-options")?.addEventListener("click",i=>{const s=i.target.closest("button");s&&(a.setTheme(s.getAttribute("data-theme")),v())}),document.getElementById("style-theme-options")?.addEventListener("click",i=>{const s=i.target.closest("button");s&&a.setStyleTheme(s.getAttribute("data-style-theme"))}),document.getElementById("heading-font-selector")?.addEventListener("change",i=>{a.setHeadingFontTheme(i.target.value)}),document.getElementById("font-selector")?.addEventListener("change",i=>{a.setFontTheme(i.target.value)}),document.getElementById("add-feed-btn")?.addEventListener("click",async()=>{const i=document.getElementById("new-feed-url"),s=i.value.trim();s&&(await Q(s)?(i.value="",alert("Feed added successfully!"),T()):alert("Failed to add feed."))});let t="opml";const n=document.getElementById("import-file");document.querySelectorAll(".import-btn").forEach(i=>{i.addEventListener("click",s=>{t=s.currentTarget.getAttribute("data-format")||"opml",n.click()})}),n?.addEventListener("change",async i=>{const s=i.target.files?.[0];s&&(await V(s,t)?(alert(`Import (${t}) started! check logs.`),T()):alert("Failed to import.")),n.value=""}),document.querySelectorAll(".delete-feed-btn").forEach(i=>{i.addEventListener("click",async s=>{const o=parseInt(s.target.getAttribute("data-id"));confirm("Delete this feed?")&&(await X(o),await T(),v())})})}async function Q(e){try{return(await m("/api/feed",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:e})})).ok}catch(t){return console.error("Failed to add feed",t),!1}}async function V(e,t){try{const n=new FormData;n.append("file",e),n.append("format",t);const i=document.cookie.split("; ").find(o=>o.startsWith("csrf_token="))?.split("=")[1];return(await fetch("/api/import",{method:"POST",headers:{"X-CSRF-Token":i||""},body:n})).ok}catch(n){return console.error("Failed to import",n),!1}}async function X(e){try{return(await m(`/api/feed/${e}`,{method:"DELETE"})).ok}catch(t){return console.error("Failed to delete feed",t),!1}}async function G(e){const t=a.items.find(n=>n._id===e);t&&p(e,{starred:!t.starred})}async function J(e){if(a.items.find(n=>n._id===e))try{const n=await m(`/api/item/${e}/content`);if(n.ok){const i=await n.json();i.full_content&&p(e,{full_content:i.full_content})}}catch(n){console.error("Failed to fetch full content",n)}}async function p(e,t){const n=String(e);y("updateItem called",n,t);try{if((await m(`/api/item/${n}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})).ok){const s=a.items.find(o=>String(o._id)===n);if(s){Object.assign(s,t);const o=document.querySelector(`.feed-item[data-id="${e}"]`);if(o){if(t.read!==void 0&&(o.classList.toggle("read",t.read),o.classList.toggle("unread",!t.read)),t.starred!==void 0){const r=o.querySelector(".star-btn");r&&(r.classList.toggle("is-starred",t.starred),r.classList.toggle("is-unstarred",!t.starred),r.setAttribute("title",t.starred?"Unstar":"Star"))}t.full_content&&S()}}}}catch(i){console.error("Failed to update item",i)}}async function T(){const e=await m("/api/feed/");if(e.ok){const t=await e.json();a.setFeeds(t)}}async function W(){const e=await m("/api/tag");if(e.ok){const t=await e.json();a.setTags(t)}}async function E(e,t,n=!1){a.setLoading(!0);try{const i=new URLSearchParams;e&&i.append("feed_id",e),t&&i.append("tag",t),a.searchQuery&&i.append("q",a.searchQuery),(a.filter==="starred"||a.filter==="all")&&i.append("read_filter","all"),a.filter==="starred"&&i.append("starred","true"),n&&a.items.length>0&&i.append("max_id",String(a.items[a.items.length-1]._id));const s=await m(`/api/stream?${i.toString()}`);if(s.ok){const o=await s.json();a.setHasMore(o.length>0),a.setItems(o,n)}}finally{a.setLoading(!1)}}async function w(){const e=d.getCurrentRoute();E(e.params.feedId,e.params.tagName,!0)}async function K(){await m("/api/logout",{method:"POST"}),window.location.href="/login/"}function I(){const e=d.getCurrentRoute(),t=e.query.get("filter");a.setFilter(t||"unread");const n=e.query.get("q");if(n!==null&&a.setSearchQuery(n),e.path==="/settings"){v();return}if(e.path==="/feed"&&e.params.feedId){const i=parseInt(e.params.feedId);a.setActiveFeed(i),E(e.params.feedId),document.getElementById("section-feeds")?.classList.remove("collapsed")}else e.path==="/tag"&&e.params.tagName?(a.setActiveTag(e.params.tagName),E(void 0,e.params.tagName),document.getElementById("section-tags")?.classList.remove("collapsed")):(a.setActiveFeed(null),a.setActiveTag(null),E())}window.addEventListener("keydown",e=>{if(!["INPUT","TEXTAREA"].includes(e.target.tagName))switch(e.key){case"j":k(1);break;case"k":k(-1);break;case"r":if(f){const t=a.items.find(n=>n._id===f);t&&p(t._id,{read:!t.read})}break;case"s":if(f){const t=a.items.find(n=>n._id===f);t&&p(t._id,{starred:!t.starred})}break;case"/":e.preventDefault(),document.getElementById("search-input")?.focus();break}});function k(e){if(a.items.length===0)return;const t=a.items.findIndex(i=>i._id===f);let n;if(t===-1?n=e>0?0:a.items.length-1:n=t+e,n>=0&&n<a.items.length){f=a.items[n]._id;const i=document.querySelector(`.feed-item[data-id="${f}"]`);i&&i.scrollIntoView({block:"start",behavior:"instant"}),a.items[n].read||p(f,{read:!0})}}a.on("feeds-updated",F);a.on("tags-updated",R);a.on("active-feed-updated",F);a.on("active-tag-updated",R);a.on("filter-updated",A);a.on("search-updated",()=>{const e=document.getElementById("search-input");e&&e.value!==a.searchQuery&&(e.value=a.searchQuery),I()});a.on("theme-updated",()=>{g||(g=document.querySelector("#app")),g&&(g.className=`theme-${a.theme} font-${a.fontTheme} heading-font-${a.headingFontTheme}`),document.querySelectorAll(".sidebar-theme-btn").forEach(e=>{e.classList.toggle("active",e.getAttribute("data-theme")===a.theme)}),d.getCurrentRoute().path==="/settings"&&v()});a.on("sidebar-toggle",()=>{const e=document.querySelector(".layout");e&&(a.sidebarVisible?(e.classList.remove("sidebar-hidden"),e.classList.add("sidebar-visible")):(e.classList.remove("sidebar-visible"),e.classList.add("sidebar-hidden")))});a.on("style-theme-updated",()=>{$(a.styleTheme),document.querySelectorAll(".sidebar-style-btn").forEach(e=>{e.classList.toggle("active",e.getAttribute("data-style-theme")===a.styleTheme)}),d.getCurrentRoute().path==="/settings"&&v()});a.on("items-updated",S);a.on("loading-state-changed",S);d.addEventListener("route-changed",I);window.app={navigate:e=>d.navigate(e)};async function Y(){const e=await m("/api/auth");if(!e||e.status===401){window.location.href="/login/";return}U(),$(a.styleTheme),A();try{await Promise.all([T(),W()])}catch(t){console.error("Initial fetch failed",t)}I()}typeof window<"u"&&!window.__VITEST__&&Y(); diff --git a/web/dist/v3/index.html b/web/dist/v3/index.html index 5ff569d..e115714 100644 --- a/web/dist/v3/index.html +++ b/web/dist/v3/index.html @@ -5,7 +5,7 @@ <link rel="icon" type="image/svg+xml" href="/vite.svg" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>neko</title> - <script type="module" crossorigin src="/v3/assets/index-C5kv_3He.js"></script> + <script type="module" crossorigin src="/v3/assets/index-BwswC14C.js"></script> <link rel="stylesheet" crossorigin href="/v3/assets/index-9FkFwXcK.css"> </head> <body> |
