aboutsummaryrefslogtreecommitdiff
path: root/chrome/js/settings.js
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/js/settings.js')
-rw-r--r--chrome/js/settings.js14
1 files changed, 10 insertions, 4 deletions
diff --git a/chrome/js/settings.js b/chrome/js/settings.js
index c5675f6..29cdf29 100644
--- a/chrome/js/settings.js
+++ b/chrome/js/settings.js
@@ -75,7 +75,7 @@ $(document).ready(function() {
var template = $('#redirect-list').html().replace(/^\s*|\s$/g, '');
function databind() {
- $('#redirect-list').html('');
+ $('#redirect-list').empty();
for (var i = 0; i < Redirector.redirectCount; i++) {
var redirect = Redirector.getRedirectAt(i);
var node = $(template);
@@ -87,10 +87,16 @@ $(document).ready(function() {
node.data('redirect', redirect);
}
- $('#redirect-list li a').click(function() {
- alert(this.parentNode.parentNode.redirect);
- });
}
+
+ $('#redirect-list li div a.delete').live('click', function(ev) {
+ var redirect = $(this.parentNode.parentNode).data('redirect');
+ if (PromptService.confirm(null, tr("deleteConfirmationTitle"), tr("deleteConfirmationText"))) {
+ Redirector.deleteRedirect(redirect);
+ $(this.parentNode.parentNode).remove();
+ }
+ ev.preventDefault();
+ });
databind();