Advertisement
NewBestPastebins

ViGGO bookmarklet

Jun 3rd, 2025 (edited)
9
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.79 KB | None | 0 0
  1. javascript:(function()%7B(()%20%3D%3E%20%7B%0A%20%20%20%20let%20cancelRequested%20%3D%20false%3B%0A%0A%20%20%20%20const%20styleButton%20%3D%20(button%2C%20bgColor)%20%3D%3E%20%7B%0A%20%20%20%20%20%20%20%20button.style.padding%20%3D%20'12px%2018px'%3B%0A%20%20%20%20%20%20%20%20button.style.width%20%3D%20'100%25'%3B%0A%20%20%20%20%20%20%20%20button.style.backgroundColor%20%3D%20bgColor%3B%0A%20%20%20%20%20%20%20%20button.style.border%20%3D%20'none'%3B%0A%20%20%20%20%20%20%20%20button.style.color%20%3D%20'white'%3B%0A%20%20%20%20%20%20%20%20button.style.borderRadius%20%3D%20'10px'%3B%0A%20%20%20%20%20%20%20%20button.style.cursor%20%3D%20'pointer'%3B%0A%20%20%20%20%20%20%20%20button.style.fontSize%20%3D%20'16px'%3B%0A%20%20%20%20%20%20%20%20button.style.transition%20%3D%20'background-color%200.3s%20ease-in-out'%3B%0A%20%20%20%20%20%20%20%20button.style.marginBottom%20%3D%20'10px'%3B%0A%20%20%20%20%7D%3B%0A%0A%20%20%20%20const%20styleInput%20%3D%20(input)%20%3D%3E%20%7B%0A%20%20%20%20%20%20%20%20input.style.width%20%3D%20'100%25'%3B%0A%20%20%20%20%20%20%20%20input.style.padding%20%3D%20'10px'%3B%0A%20%20%20%20%20%20%20%20input.style.marginBottom%20%3D%20'15px'%3B%0A%20%20%20%20%20%20%20%20input.style.borderRadius%20%3D%20'10px'%3B%0A%20%20%20%20%20%20%20%20input.style.border%20%3D%20'1px%20solid%20%23333'%3B%0A%20%20%20%20%20%20%20%20input.style.backgroundColor%20%3D%20'%232b2b2b'%3B%0A%20%20%20%20%20%20%20%20input.style.color%20%3D%20'%23f1f1f1'%3B%0A%20%20%20%20%20%20%20%20input.style.fontSize%20%3D%20'16px'%3B%0A%20%20%20%20%7D%3B%0A%0A%20%20%20%20const%20extractMessageIds%20%3D%20()%20%3D%3E%20%7B%0A%20%20%20%20const%20messageElements%20%3D%20document.querySelectorAll('li%5Bdata-drag-id%5D')%3B%0A%20%20%20%20return%20Array.from(messageElements)%0A%20%20%20%20%20%20%20%20.map(el%20%3D%3E%20el.getAttribute('data-drag-id'))%0A%20%20%20%20%20%20%20%20.filter(id%20%3D%3E%20%2F%5E%5Cd%7B6%7D%24%2F.test(id))%3B%20%2F%2F%20Only%206-digit%20numeric%20IDs%0A%7D%3B%0A%0A%0A%20%20%20%20const%20deleteMessages%20%3D%20async%20(messageIds%2C%20statusText%2C%20progressBar)%20%3D%3E%20%7B%0A%20%20%20%20%20%20%20%20const%20url%20%3D%20'https%3A%2F%2Faae.viggo.dk%2FBasic%2FMessage%2FDeleteMessages%2F%3FfolderId%3D11'%3B%0A%20%20%20%20%20%20%20%20let%20deleted%20%3D%200%3B%0A%20%20%20%20%20%20%20%20let%20i%20%3D%200%3B%0A%20%20%20%20%20%20%20%20while%20(i%20%3C%20messageIds.length)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20(cancelRequested)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20statusText.textContent%20%3D%20%60Annulleret%20efter%20%24%7Bdeleted%7D%20%2F%20%24%7BmessageIds.length%7D%20beskeder.%60%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20const%20bulkSize%20%3D%20Math.floor(Math.random()%20*%20(175%20-%2075%20%2B%201))%20%2B%2075%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20const%20chunk%20%3D%20messageIds.slice(i%2C%20i%20%2B%20bulkSize)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20const%20payload%20%3D%20chunk.map(id%20%3D%3E%20%60MessageId%3D%24%7BencodeURIComponent(id)%7D%60).join('%26')%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20try%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20const%20res%20%3D%20await%20fetch(url%2C%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20method%3A%20'DELETE'%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20headers%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20'Accept'%3A%20'*%2F*'%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20'Content-Type'%3A%20'application%2Fx-www-form-urlencoded'%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20'X-Requested-With'%3A%20'XMLHttpRequest'%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20body%3A%20payload%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20credentials%3A%20'include'%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20(res.ok)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20deleted%20%2B%3D%20chunk.length%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20progressBar.value%20%3D%20(deleted%20%2F%20messageIds.length)%20*%20100%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20statusText.textContent%20%3D%20%60Sletter%20%24%7Bdeleted%7D%20%2F%20%24%7BmessageIds.length%7D%60%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20console.error('Sletning%20fejlede%3A'%2C%20res.statusText)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%20catch%20(err)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20console.error('Netv%C3%A6rksfejl%20ved%20sletning%3A'%2C%20err)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20i%20%2B%3D%20bulkSize%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20alert(%60%24%7Bdeleted%7D%20besked(er)%20slettet.%60)%3B%0A%20%20%20%20%20%20%20%20statusText.textContent%20%3D%20'Sletning%20f%C3%A6rdig%20-%20opdaterer%20siden...'%3B%0A%20%20%20%20%20%20%20%20setTimeout(()%20%3D%3E%20location.reload()%2C%201500)%3B%0A%20%20%20%20%7D%3B%0A%0A%20%20%20%20const%20showConfirmation%20%3D%20(count%2C%20onConfirm)%20%3D%3E%20%7B%0A%20%20%20%20%20%20%20%20const%20confirmBox%20%3D%20document.createElement('div')%3B%0A%20%20%20%20%20%20%20%20confirmBox.style.position%20%3D%20'fixed'%3B%0A%20%20%20%20%20%20%20%20confirmBox.style.top%20%3D%20'50%25'%3B%0A%20%20%20%20%20%20%20%20confirmBox.style.left%20%3D%20'50%25'%3B%0A%20%20%20%20%20%20%20%20confirmBox.style.transform%20%3D%20'translate(-50%25%2C%20-50%25)'%3B%0A%20%20%20%20%20%20%20%20confirmBox.style.background%20%3D%20'%231a1a1a'%3B%0A%20%20%20%20%20%20%20%20confirmBox.style.color%20%3D%20'%23fff'%3B%0A%20%20%20%20%20%20%20%20confirmBox.style.padding%20%3D%20'20px'%3B%0A%20%20%20%20%20%20%20%20confirmBox.style.borderRadius%20%3D%20'12px'%3B%0A%20%20%20%20%20%20%20%20confirmBox.style.boxShadow%20%3D%20'0%200%2015px%20rgba(0%2C0%2C0%2C0.5)'%3B%0A%20%20%20%20%20%20%20%20confirmBox.style.zIndex%20%3D%20'10000'%3B%0A%20%20%20%20%20%20%20%20confirmBox.innerHTML%20%3D%20%60%3Cp%20style%3D%22font-size%3A16px%3Bmargin-bottom%3A15px%3B%22%3EEr%20du%20sikker%20p%C3%A5%2C%20at%20du%20vil%20slette%20%3Cstrong%3E%24%7Bcount%7D%3C%2Fstrong%3E%20besked(er)%3F%3C%2Fp%3E%60%3B%0A%0A%20%20%20%20%20%20%20%20const%20btnYes%20%3D%20document.createElement('button')%3B%0A%20%20%20%20%20%20%20%20btnYes.textContent%20%3D%20'%E2%9C%85%20Ja%2C%20slet'%3B%0A%20%20%20%20%20%20%20%20styleButton(btnYes%2C%20'%23f44336')%3B%0A%20%20%20%20%20%20%20%20btnYes.style.width%20%3D%20'45%25'%3B%0A%20%20%20%20%20%20%20%20btnYes.style.marginRight%20%3D%20'10%25'%3B%0A%0A%20%20%20%20%20%20%20%20const%20btnNo%20%3D%20document.createElement('button')%3B%0A%20%20%20%20%20%20%20%20btnNo.textContent%20%3D%20'%E2%9D%8C%20Annuller'%3B%0A%20%20%20%20%20%20%20%20styleButton(btnNo%2C%20'%23555')%3B%0A%20%20%20%20%20%20%20%20btnNo.style.width%20%3D%20'45%25'%3B%0A%0A%20%20%20%20%20%20%20%20btnYes.addEventListener('click'%2C%20()%20%3D%3E%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20document.body.removeChild(confirmBox)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20onConfirm()%3B%0A%20%20%20%20%20%20%20%20%7D)%3B%0A%0A%20%20%20%20%20%20%20%20btnNo.addEventListener('click'%2C%20()%20%3D%3E%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20document.body.removeChild(confirmBox)%3B%0A%20%20%20%20%20%20%20%20%7D)%3B%0A%0A%20%20%20%20%20%20%20%20confirmBox.appendChild(btnYes)%3B%0A%20%20%20%20%20%20%20%20confirmBox.appendChild(btnNo)%3B%0A%20%20%20%20%20%20%20%20document.body.appendChild(confirmBox)%3B%0A%20%20%20%20%7D%3B%0A%0A%20%20%20%20const%20createUI%20%3D%20()%20%3D%3E%20%7B%0A%20%20%20%20%20%20%20%20const%20uiContainer%20%3D%20document.createElement('div')%3B%0A%20%20%20%20%20%20%20%20uiContainer.style.width%20%3D%20'300px'%3B%0A%20%20%20%20%20%20%20%20uiContainer.style.position%20%3D%20'fixed'%3B%0A%20%20%20%20%20%20%20%20uiContainer.style.top%20%3D%20'100px'%3B%0A%20%20%20%20%20%20%20%20uiContainer.style.right%20%3D%20'50px'%3B%0A%20%20%20%20%20%20%20%20uiContainer.style.backgroundColor%20%3D%20'%231a1a1a'%3B%0A%20%20%20%20%20%20%20%20uiContainer.style.color%20%3D%20'%23f1f1f1'%3B%0A%20%20%20%20%20%20%20%20uiContainer.style.padding%20%3D%20'20px'%3B%0A%20%20%20%20%20%20%20%20uiContainer.style.borderRadius%20%3D%20'15px'%3B%0A%20%20%20%20%20%20%20%20uiContainer.style.boxShadow%20%3D%20'0%206px%2012px%20rgba(0%2C%200%2C%200%2C%200.3)'%3B%0A%20%20%20%20%20%20%20%20uiContainer.style.zIndex%20%3D%20'9999'%3B%0A%20%20%20%20%20%20%20%20uiContainer.style.fontFamily%20%3D%20%22'Arial'%2C%20sans-serif%22%3B%0A%20%20%20%20%20%20%20%20uiContainer.style.display%20%3D%20'none'%3B%0A%0A%20%20%20%20%20%20%20%20const%20header%20%3D%20document.createElement('div')%3B%0A%20%20%20%20%20%20%20%20header.innerHTML%20%3D%20'%F0%9F%97%91%EF%B8%8F%20%3Cstrong%3EViggo%20Besked%20Sletter%3C%2Fstrong%3E'%3B%0A%20%20%20%20%20%20%20%20header.style.marginBottom%20%3D%20'15px'%3B%0A%20%20%20%20%20%20%20%20header.style.fontSize%20%3D%20'18px'%3B%0A%20%20%20%20%20%20%20%20uiContainer.appendChild(header)%3B%0A%0A%20%20%20%20%20%20%20%20const%20label%20%3D%20document.createElement('label')%3B%0A%20%20%20%20%20%20%20%20label.textContent%20%3D%20'Skriv%20Besked%20ID(er)%20(komma-separeret)%3A'%3B%0A%20%20%20%20%20%20%20%20label.style.display%20%3D%20'block'%3B%0A%20%20%20%20%20%20%20%20label.style.marginBottom%20%3D%20'5px'%3B%0A%0A%20%20%20%20%20%20%20%20const%20textarea%20%3D%20document.createElement('textarea')%3B%0A%20%20%20%20%20%20%20%20textarea.style.width%20%3D%20'100%25'%3B%0A%20%20%20%20%20%20%20%20textarea.style.height%20%3D%20'100px'%3B%0A%20%20%20%20%20%20%20%20textarea.style.padding%20%3D%20'10px'%3B%0A%20%20%20%20%20%20%20%20textarea.style.borderRadius%20%3D%20'10px'%3B%0A%20%20%20%20%20%20%20%20textarea.style.border%20%3D%20'1px%20solid%20%23333'%3B%0A%20%20%20%20%20%20%20%20textarea.style.marginBottom%20%3D%20'15px'%3B%0A%20%20%20%20%20%20%20%20textarea.style.backgroundColor%20%3D%20'%232b2b2b'%3B%0A%20%20%20%20%20%20%20%20textarea.style.color%20%3D%20'%23f1f1f1'%3B%0A%20%20%20%20%20%20%20%20textarea.style.resize%20%3D%20'none'%3B%0A%0A%20%20%20%20%20%20%20%20const%20extractButton%20%3D%20document.createElement('button')%3B%0A%20%20%20%20%20%20%20%20extractButton.textContent%20%3D%20'%F0%9F%94%8E%20Find%20alle%20besked%20ID(er)'%3B%0A%20%20%20%20%20%20%20%20styleButton(extractButton%2C%20'%234CAF50')%3B%0A%20%20%20%20%20%20%20%20extractButton.addEventListener('click'%2C%20()%20%3D%3E%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20const%20messageIds%20%3D%20extractMessageIds()%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20textarea.value%20%3D%20messageIds.join('%2C%20')%3B%0A%20%20%20%20%20%20%20%20%7D)%3B%0A%0A%20%20%20%20%20%20%20%20const%20topExclusionLabel%20%3D%20document.createElement('label')%3B%0A%20%20%20%20%20%20%20%20topExclusionLabel.textContent%20%3D%20'Antal%20beskeder%20der%20skal%20beholdes%20fra%20toppen%3A'%3B%0A%20%20%20%20%20%20%20%20topExclusionLabel.style.display%20%3D%20'block'%3B%0A%20%20%20%20%20%20%20%20topExclusionLabel.style.marginBottom%20%3D%20'5px'%3B%0A%0A%20%20%20%20%20%20%20%20const%20topExclusionInput%20%3D%20document.createElement('input')%3B%0A%20%20%20%20%20%20%20%20topExclusionInput.type%20%3D%20'number'%3B%0A%20%20%20%20%20%20%20%20styleInput(topExclusionInput)%3B%0A%0A%20%20%20%20%20%20%20%20const%20statusText%20%3D%20document.createElement('div')%3B%0A%20%20%20%20%20%20%20%20statusText.style.marginBottom%20%3D%20'10px'%3B%0A%0A%20%20%20%20%20%20%20%20const%20progressBar%20%3D%20document.createElement('progress')%3B%0A%20%20%20%20%20%20%20%20progressBar.style.width%20%3D%20'100%25'%3B%0A%20%20%20%20%20%20%20%20progressBar.max%20%3D%20100%3B%0A%20%20%20%20%20%20%20%20progressBar.value%20%3D%200%3B%0A%0A%20%20%20%20%20%20%20%20const%20cancelButton%20%3D%20document.createElement('button')%3B%0A%20%20%20%20%20%20%20%20cancelButton.textContent%20%3D%20'%E2%9B%94%20Annuller'%3B%0A%20%20%20%20%20%20%20%20styleButton(cancelButton%2C%20'%23555')%3B%0A%20%20%20%20%20%20%20%20cancelButton.style.marginTop%20%3D%20'10px'%3B%0A%20%20%20%20%20%20%20%20cancelButton.addEventListener('click'%2C%20()%20%3D%3E%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20cancelRequested%20%3D%20true%3B%0A%20%20%20%20%20%20%20%20%7D)%3B%0A%0A%20%20%20%20%20%20%20%20const%20deleteButton%20%3D%20document.createElement('button')%3B%0A%20%20%20%20%20%20%20%20deleteButton.textContent%20%3D%20'%F0%9F%97%91%EF%B8%8F%20Slet%20Beskeder'%3B%0A%20%20%20%20%20%20%20%20styleButton(deleteButton%2C%20'%23f44336')%3B%0A%20%20%20%20%20%20%20%20deleteButton.addEventListener('click'%2C%20()%20%3D%3E%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20cancelRequested%20%3D%20false%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20const%20topCount%20%3D%20parseInt(topExclusionInput.value)%20%7C%7C%200%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20const%20allIds%20%3D%20textarea.value.split('%2C').map(id%20%3D%3E%20id.trim()).filter(Boolean)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20const%20idsToDelete%20%3D%20topCount%20%3E%200%20%3F%20allIds.slice(topCount)%20%3A%20allIds%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20(idsToDelete.length%20%3D%3D%3D%200)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20statusText.textContent%20%3D%20'Ingen%20beskeder%20valgt.'%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20showConfirmation(idsToDelete.length%2C%20async%20()%20%3D%3E%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20deleteButton.disabled%20%3D%20true%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20deleteButton.style.opacity%20%3D%20'0.5'%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20deleteButton.textContent%20%3D%20'%E2%8F%B3%20Sletter...'%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20statusText.textContent%20%3D%20%60Sletter%200%20%2F%20%24%7BidsToDelete.length%7D%60%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20await%20deleteMessages(idsToDelete%2C%20statusText%2C%20progressBar)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20deleteButton.disabled%20%3D%20false%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20deleteButton.style.opacity%20%3D%20'1'%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20deleteButton.textContent%20%3D%20'%F0%9F%97%91%EF%B8%8F%20Slet%20Beskeder'%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%20%20%20%20%7D)%3B%0A%0A%20%20%20%20%20%20%20%20const%20helpButton%20%3D%20document.createElement('button')%3B%0A%20%20%20%20%20%20%20%20helpButton.textContent%20%3D%20'%F0%9F%93%98%20Brugsanvisning'%3B%0A%20%20%20%20%20%20%20%20styleButton(helpButton%2C%20'%23007BFF')%3B%0A%20%20%20%20%20%20%20%20helpButton.addEventListener('click'%2C%20()%20%3D%3E%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20alert(%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20'%F0%9F%94%B9%20S%C3%A5dan%20bruger%20du%20Viggo%20Besked%20Sletter%3A%5Cn%5Cn'%20%2B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20'1%EF%B8%8F%E2%83%A3%20Scroll%20helt%20ned%20til%20bunden%20s%C3%A5%20alle%20beskeder%20indl%C3%A6ses.%5Cn'%20%2B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20'2%EF%B8%8F%E2%83%A3%20Klik%20%22%F0%9F%94%8E%20Find%20alle%20besked%20ID(er)%22%20for%20at%20samle%20ID%E2%80%99erne.%5Cn'%20%2B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20'3%EF%B8%8F%E2%83%A3%20Udfyld%20antal%20fra%20toppen%20du%20vil%20beholde.%5Cn'%20%2B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20'4%EF%B8%8F%E2%83%A3%20Klik%20%22%F0%9F%97%91%EF%B8%8F%20Slet%20Beskeder%22%20for%20at%20starte%20sletningen.%5Cn'%20%2B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20'%E2%9D%97%20Hvis%20du%20vil%20beholde%20beskeder%20fra%20bunden%2C%20skal%20du%20manuelt%20slette%20ID(erne)%20p%C3%A5%20de%20beskeder%2C%20du%20vil%20beholde.%20Beskedernes%20ID(er)%20st%C3%A5r%20i%20den%20samme%20r%C3%A6kkef%C3%B8lge%20som%20p%C3%A5%20selve%20beskedlisten%20p%C3%A5%20hjemmesiden%20i%20tekstfeltet%20med%20titlen%20%22Skriv%20Besked%20ID(er)%20(komma-separeret)%3A%22%2C%20s%C3%A5%20det%20sidste%20ID%20er%20ogs%C3%A5%20den%20sidste%20besked.%5Cn'%20%2B%0A%09%09%09%20%20%20%20'%E2%9D%97%20Sletning%20kan%20ikke%20fortrydes.%5Cn'%20%2B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20'%E2%9B%94%20Du%20kan%20afbryde%20med%20%22Annuller%22%20undervejs.%5Cn'%20%2B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20'%E2%9C%85%20N%C3%A5r%20f%C3%A6rdig%2C%20genindl%C3%A6ses%20siden%20automatisk.'%0A%20%20%20%20%20%20%20%20%20%20%20%20)%3B%0A%20%20%20%20%20%20%20%20%7D)%3B%0A%0A%20%20%20%20%20%20%20%20uiContainer.appendChild(label)%3B%0A%20%20%20%20%20%20%20%20uiContainer.appendChild(textarea)%3B%0A%20%20%20%20%20%20%20%20uiContainer.appendChild(extractButton)%3B%0A%20%20%20%20%20%20%20%20uiContainer.appendChild(topExclusionLabel)%3B%0A%20%20%20%20%20%20%20%20uiContainer.appendChild(topExclusionInput)%3B%0A%20%20%20%20%20%20%20%20uiContainer.appendChild(deleteButton)%3B%0A%20%20%20%20%20%20%20%20uiContainer.appendChild(cancelButton)%3B%0A%20%20%20%20%20%20%20%20uiContainer.appendChild(statusText)%3B%0A%20%20%20%20%20%20%20%20uiContainer.appendChild(progressBar)%3B%0A%20%20%20%20%20%20%20%20uiContainer.appendChild(helpButton)%3B%0A%0A%20%20%20%20%20%20%20%20document.body.appendChild(uiContainer)%3B%0A%0A%20%20%20%20%20%20%20%20const%20toggleButton%20%3D%20document.createElement('button')%3B%0A%20%20%20%20%20%20%20%20toggleButton.textContent%20%3D%20'%F0%9F%94%BD%20%C3%85ben%20Sletter'%3B%0A%20%20%20%20%20%20%20%20toggleButton.style.position%20%3D%20'fixed'%3B%0A%20%20%20%20%20%20%20%20toggleButton.style.top%20%3D%20'47px'%3B%0A%20%20%20%20%20%20%20%20toggleButton.style.right%20%3D%20'200px'%3B%0A%20%20%20%20%20%20%20%20toggleButton.style.backgroundColor%20%3D%20'%231a1a1a'%3B%0A%20%20%20%20%20%20%20%20toggleButton.style.color%20%3D%20'%23f1f1f1'%3B%0A%20%20%20%20%20%20%20%20toggleButton.style.padding%20%3D%20'6px%2010px'%3B%0A%20%20%20%20%20%20%20%20toggleButton.style.border%20%3D%20'none'%3B%0A%20%20%20%20%20%20%20%20toggleButton.style.borderRadius%20%3D%20'8px'%3B%0A%20%20%20%20%20%20%20%20toggleButton.style.cursor%20%3D%20'pointer'%3B%0A%20%20%20%20%20%20%20%20toggleButton.style.fontSize%20%3D%20'14px'%3B%0A%20%20%20%20%20%20%20%20toggleButton.addEventListener('click'%2C%20()%20%3D%3E%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20const%20isVisible%20%3D%20uiContainer.style.display%20%3D%3D%3D%20'block'%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20uiContainer.style.display%20%3D%20isVisible%20%3F%20'none'%20%3A%20'block'%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20toggleButton.textContent%20%3D%20isVisible%20%3F%20'%F0%9F%94%BD%20%C3%85ben%20Sletter'%20%3A%20'%F0%9F%94%BC%20Luk%20Sletter'%3B%0A%20%20%20%20%20%20%20%20%7D)%3B%0A%0A%20%20%20%20%20%20%20%20document.body.appendChild(toggleButton)%3B%0A%20%20%20%20%7D%3B%0A%0A%20%20%20%20createUI()%3B%0A%7D)()%3B%7D)()%3B
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement