X-Git-Url: https://git.ktnx.net/?p=icedeb.git;a=blobdiff_plain;f=icedeb.js;fp=icedeb.js;h=29327a85166cc6df8d45d018bf7421f6a4be7b20;hp=0d6676b5e4e9d49581548b22975e7da491adf9b9;hb=7c295465c545334178efd5b6647a75ca3052dff8;hpb=8d1b1cdb775934468076dd7ef7cafaf9a95d9b25 diff --git a/icedeb.js b/icedeb.js index 0d6676b..29327a8 100644 --- a/icedeb.js +++ b/icedeb.js @@ -174,7 +174,7 @@ function link_clicked(e) { function check_likely_inputs(q) { let cnt = document.getElementById('button-list-container').classList; - cnt.remove('like-b', 'like-p', 'like-m', 'like-i'); + cnt.remove('like-b', 'like-p', 'like-m', 'like-i', 'like-s'); document.querySelectorAll('.likely') .forEach((el) => { el.classList.remove('likely'); @@ -195,7 +195,10 @@ function check_likely_inputs(q) { if ( /^<.+@.+>$/.test(q) ) cnt.add('like-i'); - document.querySelectorAll('.like-b .hint.b, .like-p .hint.p, .like-m .hint.m, .like-i .hint.i') + if ( /^d[sl]a[- ]\d+(-\d+)?$/i.test(q) ) + cnt.add('like-s'); + + document.querySelectorAll('.like-b .hint.b, .like-p .hint.p, .like-m .hint.m, .like-i .hint.i, .like-s .hint.s') .forEach((el) => { el.parentElement.parentElement.classList.add('likely'); } );