1 2window.addEventListener("DOMContentLoaded", async (event) => { 3 4 const scriptTag = document.querySelector('script[src$="bookmarks/list.js"]'); 5 const bookmarkWrapper = document.createElement('div'); 6 scriptTag.parentNode.insertBefore(bookmarkWrapper, scriptTag); 7 8 const bookmarks = await getBookmarkList(); 9 const newList = document.createElement("ul"); 10 11 console.log(1234); 12 13 if(bookmarks.length){ 14 15 newList.classList.add("bookmarkList"); 16 17 bookmarks.forEach(({url, title, description})=>{ 18 const listEntry = document.createElement("li"); 19 listEntry.classList.add("bookmarkListEntry"); 20 listEntry.dataset.url = url; 21 listEntry.innerHTML = '<a href="#" class="bookmarkIt" tab-index="1" title="Seite von den Lesezeichen entfernen" aria-lable="Seite von den Lesezeichen entfernen"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path d="M0 48V487.7C0 501.1 10.9 512 24.3 512c5 0 9.9-1.5 14-4.4L192 400 345.7 507.6c4.1 2.9 9 4.4 14 4.4c13.4 0 24.3-10.9 24.3-24.3V48c0-26.5-21.5-48-48-48H48C21.5 0 0 21.5 0 48z"/></svg></a>'; 22 listEntry.innerHTML += '<div class="listEntryTitle"><h3>'+title+'</h3></div>'; 23 listEntry.innerHTML += '<div class="listEntryDescription">'+description+'</div>'; 24 listEntry.innerHTML += '<div class="listEntryLink"><a class="next" title="Lesezeichen aufrufen" aria-lable="Lesezeichen aufrufen" href="'+url+'">Lesezeichen aufrufen</a></div>'; 25 newList.appendChild(listEntry); 26 }); 27 28 bookmarkWrapper.appendChild(newList); 29 30 const bookmarkListEntries = document.querySelectorAll('.bookmarkListEntry'); 31 bookmarkListEntries.forEach(function(listEntry) { 32 listEntry.addEventListener('click', function() { 33 const url = listEntry.dataset.url; 34 window.location.href = url; 35 }); 36 }); 37 38 const bookmarkItEntries = document.querySelectorAll('.bookmarkIt'); 39 bookmarkItEntries.forEach(function(bookmarkIt) { 40 41 bookmarkIt.addEventListener('click', function(event) { 42 event.preventDefault(); 43 event.stopPropagation(); 44 const url = bookmarkIt.parentElement.dataset.url; 45 deleteBookmark(url); 46 47 bookmarkIt.parentElement.remove(); 48 49 return false; 50 }); 51 }); 52 53 54 55 56 57 58 } else { 59 bookmarkWrapper.innerHTML = '<div class="elementText elementText_var50 elementTextListStyle_var0"><p>Sie haben aktuell noch keine Lesezeichen gesetzt.</p></div>'; 60 } 61 62}); 63 64 65 66 67 68
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.