diff options
author | Einar Egilsson | 2011-08-29 22:47:26 +0200 |
---|---|---|
committer | Einar Egilsson | 2011-08-29 22:47:26 +0200 |
commit | b69f768ac83291de532161ae1da48ea20ffc01d6 (patch) | |
tree | 1fe09119cb67333505ed5755e687a9b125103e3e /chrome/js/settings.js | |
parent | 66ad230105ccf1b504d9589886f174020c324b18 (diff) |
CSS for settings page
Diffstat (limited to 'chrome/js/settings.js')
-rw-r--r-- | chrome/js/settings.js | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/chrome/js/settings.js b/chrome/js/settings.js index 3ab7c25..fbbc332 100644 --- a/chrome/js/settings.js +++ b/chrome/js/settings.js @@ -73,13 +73,27 @@ $(document).ready(function() { } } + var template = $('#redirect-list').html().replace(/^\s*|\s$/g, ''); function databind() { + $('#redirect-list').html(''); for (var i = 0; i < Redirector.redirectCount; i++) { var redirect = Redirector.getRedirectAt(i); - $('#redirect-list'); + var node = $(template); + node.find('.pattern').html(redirect.includePattern); + node.find('.redirectTo').html(redirect.redirectUrl); + node.find('.exampleUrl').html(redirect.exampleUrl); + node.find('.redirectResult').html(redirect.getMatch(redirect.exampleUrl).redirectTo); + node.appendTo('#redirect-list'); + node.redirect = redirect; } + + $('#redirect-list li a').click(function() { + alert(this.parentNode.parentNode.redirect); + }); } + + databind(); $('#import').click(importRedirects); $('#export').click(exportRedirects); |