https://www.citybahn.at/_assets/1798f66a72c0609b2ee5b404d10475ff/D…/Bookmark.7a080dc6e977bb218a07.js
1(()=>{class t{constructor(){this.apiUrl="/action/bookmark",this.storageKey="noew_bookmark_hash",this.hash=this.getBookmarkHash(),this.init()}getBookmarkHash(){return localStorage.getItem(this.storageKey)||""}async init(){const t=await this.getCount();this.updateCount(t)}async getCount(){if(!this.hash)return 0;const t=new URLSearchParams({action:"info",hash:this.hash}),o=`${this.apiUrl}?${t.toString()}`;try{const t=await fetch(o,{method:"GET",headers:{Accept:"application/json"},credentials:"same-origin"}),e=await t.json();if(!t.ok||!e.success)throw new Error(e.error||"Could not retrieve bookmark count");return Number(e.data?.count)||0}catch(t){return 0}}updateCount(t){const o=document.querySelectorAll(".js-bookmark-count");0===o.length&&console.warn("[BookmarkCount] No elements found with class .js-bookmark-count"),o.forEach(((o,e)=>{const a=t<1;o.textContent=String(t),o.hidden=a,o.setAttribute("aria-label",`${t} bookmark${1===t?"":"s"}`)}));const e=document.querySelector("#pageHeader__bookmark"),a=e?.querySelector("iconify-icon, .iconify"),n=t>0;a&&a.setAttribute("icon",n?"ion:bookmark":"ion:bookmark-outline"),e?.classList.toggle("has-bookmarks",n)}}const o=()=>{new t};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",o):o()})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.