X-Git-Url: https://git.ktnx.net/?p=icedeb.git;a=blobdiff_plain;f=chrome%2Fcontent%2Ficedeb.js;h=9c393462bca055985bcc77c96c320bd50705dafb;hp=061f3cd93cf5edf8716ca239b13fc5505e4bdea7;hb=967f267a7ad4d2d09057718f32102855184d7f7e;hpb=94e44a6d22be5bf260f25bad12f0a50239a2f155 diff --git a/chrome/content/icedeb.js b/chrome/content/icedeb.js index 061f3cd..9c39346 100644 --- a/chrome/content/icedeb.js +++ b/chrome/content/icedeb.js @@ -37,10 +37,8 @@ IceDeb = { do { oldword = word; - word = word.replace(/^\s+/, ''); - word = word.replace(/\s+$/, ''); - word = word.replace(/^#/, ''); - word = word.replace(/[-:\/,.]$/, ''); + word = word.replace(/^[^a-zA-Z0-9]+/, ''); + word = word.replace(/[^a-zA-Z0-9]+$/, ''); } while ( oldword != word ); return word; @@ -87,6 +85,20 @@ IceDeb = { loadURI(uri); } }, + lookup_ml: function(in_new) { + var msg_id = IceDeb.trim_keyword(IceDeb.getClipboardText()); + if (!msg_id) msg_id = ''; + var uri="http://lists.debian.org/msgid-search/" + msg_id; + + if (in_new) { + var b = getBrowser(); + var new_tab = b.addTab(uri); + b.selectedTab = new_tab; + } + else { + loadURI(uri); + } + }, btsButton: function (e) { if ( e.button == 0 ) @@ -105,6 +117,12 @@ IceDeb = { IceDeb.lookup_deb(false) else if ( e.button == 1 ) IceDeb.lookup_deb(true); + }, + mlButton: function (e) { + if ( e.button == 0 ) + IceDeb.lookup_ml(false) + else if ( e.button == 1 ) + IceDeb.lookup_ml(true); } }