diff options
author | Matěj Cepl <mcepl@redhat.com> | 2010-08-06 00:05:38 -0400 |
---|---|---|
committer | Matěj Cepl <mcepl@redhat.com> | 2010-08-06 01:33:04 -0400 |
commit | a08f7e8595dfb576396857270e9218db9ef59824 (patch) | |
tree | a0a71f3a1a515312d21e11bbda7779a7ad42508e /lib/bzpage.js | |
parent | 70c60b518c8017156c452d8ce689c791b17a8b77 (diff) | |
download | bugzilla-triage-a08f7e8595dfb576396857270e9218db9ef59824.tar.gz |
Gnome makes emails much more complicated.
Also adding bugzilla.gnome.org to the default JSON so that it can be
configured to some other JSON file.
Diffstat (limited to 'lib/bzpage.js')
-rw-r--r-- | lib/bzpage.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/bzpage.js b/lib/bzpage.js index 07e7ea9..1731b64 100644 --- a/lib/bzpage.js +++ b/lib/bzpage.js @@ -499,9 +499,15 @@ BZPage.prototype.setConfigurationButton = function setConfigurationButton () { * */ BZPage.prototype.parseMailto = function parseMailto(aElement) { + var emailStr = "", hrefStr = ""; if (aElement) { - return decodeURI(aElement.getAttribute("href")). - split(":")[1]; + hrefStr = decodeURIComponent(aElement.getAttribute("href")); + emailStr = hrefStr.split(":")[1]; + if (emailStr === undefined) { + var params = util.getParamsFromURL("https://" + this.hostname + "/" + hrefStr); + emailStr = decodeURI(params['login']); + } + return emailStr; } return null; }; |