summaryrefslogtreecommitdiffstats
path: root/extensions/BugModal/web
diff options
context:
space:
mode:
authorByron Jones <glob@mozilla.com>2015-07-13 09:38:59 +0200
committerByron Jones <glob@mozilla.com>2015-07-13 09:38:59 +0200
commit377acf2d61b8618f7b1e85f2a81c367b33d83a78 (patch)
treea25ee3b91de42d90aa8814b0972d1a78acc22851 /extensions/BugModal/web
parente8551401528989667d87b4f7df9c3f97f5535cf7 (diff)
downloadbugzilla-377acf2d61b8618f7b1e85f2a81c367b33d83a78.tar.gz
bugzilla-377acf2d61b8618f7b1e85f2a81c367b33d83a78.tar.xz
Bug 1180880: Make the "URL" field in the new UI more prominent
Diffstat (limited to 'extensions/BugModal/web')
-rw-r--r--extensions/BugModal/web/bug_modal.js22
1 files changed, 13 insertions, 9 deletions
diff --git a/extensions/BugModal/web/bug_modal.js b/extensions/BugModal/web/bug_modal.js
index b1eb17b81..1a7f7ea81 100644
--- a/extensions/BugModal/web/bug_modal.js
+++ b/extensions/BugModal/web/bug_modal.js
@@ -81,16 +81,20 @@ $(function() {
});
// url --> unsafe warning
- $('.unsafe-url')
+ $('.bug-url')
.click(function(event) {
- event.preventDefault();
- if (confirm('This is considered an unsafe URL and could possibly be harmful. ' +
- 'The full URL is:\n\n' + $(event.target).attr('title') + '\n\nContinue?'))
- {
- try {
- window.open($(event.target).attr('title'));
- } catch(ex) {
- alert('Malformed URL');
+ var that = $(this);
+ event.stopPropagation();
+ if (!that.data('safe')) {
+ event.preventDefault();
+ if (confirm('This is considered an unsafe URL and could possibly be harmful. ' +
+ 'The full URL is:\n\n' + that.attr('href') + '\n\nContinue?'))
+ {
+ try {
+ window.open(that.attr('href'));
+ } catch(ex) {
+ alert('Malformed URL');
+ }
}
}
});