X-Git-Url: https://git.ktnx.net/?p=icedeb.git;a=blobdiff_plain;f=icedeb.js;h=2d2a10e24d61824a54f91d3a1afec5df45b90695;hp=9c9a77053aa597e6b418f69d5efd6c2306a92eb6;hb=b5e5c86b11624752ed6b30c92b6791b563b239ee;hpb=aee59ae1e856b0f51f4806fdadfdb6ecda01609e diff --git a/icedeb.js b/icedeb.js index 9c9a770..2d2a10e 100644 --- a/icedeb.js +++ b/icedeb.js @@ -117,8 +117,6 @@ function link_clicked(e) { } let clip_input = document.getElementById("clipboard"); - if(clip_input.value == '') - get_clipboard_contents(); let clip = trim(clip_input.value); if(clip_input.value == '') return; @@ -139,17 +137,16 @@ function link_clicked(e) { url = 'https://lists.debian.org/msgid-search/' + clip; break; case 'ddpo': - url = 'https://qa.debian.org/developer.php'; - if (clip != '') - url += '?login=' + clip; + url = 'https://qa.debian.org/developer.php?login=' + clip; + break; + case 'dmd': + url = 'https://udd.debian.org/dmd.cgi?email1=' + clip; break; case 'buildd': url = 'https://buildd.debian.org/' + clip; break; case 'security': - url = 'https://security-tracker.debian.org/'; - if (clip != '') - url += 'tracker/' + clip; + url = 'https://security-tracker.debian.org/tracker/' + clip; break; } @@ -166,17 +163,10 @@ function link_clicked(e) { } function get_clipboard_contents() { - document.getElementById('error').classList.add('hidden'); - let clip_pot = document.getElementById('clip-pot'); let clip_input = document.getElementById("clipboard"); clip_pot.focus(); - if (!document.execCommand("Paste")) { - let err = document.getElementById('error'); - err.textContent = 'Error retrieving clipboard contents'; - err.classList.remove('hidden'); - } - else { + if (document.execCommand("Paste")) { clip_input.value = clip_pot.textContent.trim(); clip_input.focus(); clip_input.setSelectionRange(0, clip_input.value.length)