1export function replaceGalleryHash(index) { 2 const url = new URL(window.location.href); 3 const newHash = `#fotka-${index + 1}`; 4 5 if (url.hash !== newHash) { 6 url.hash = newHash; 7 window.history.replaceState(null, '', url); 8 } 9} 10 11export function getGalleryIndexFromHash(slideCount) { 12 const match = window.location.hash.match(/^#fotka-(\d+)$/); 13 if (!match) { 14 return null; 15 } 16 17 const photoNumber = Number.parseInt(match[1], 10); 18 const index = photoNumber - 1; 19 20 return index >= 0 && index < slideCount ? index : null; 21}
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.