From b69f768ac83291de532161ae1da48ea20ffc01d6 Mon Sep 17 00:00:00 2001 From: Einar Egilsson Date: Mon, 29 Aug 2011 22:47:26 +0200 Subject: CSS for settings page --- chrome/js/settings.js | 16 ++++++++++- chrome/settings.html | 77 ++++++++++++++++++++++++++++++++++++--------------- 2 files changed, 69 insertions(+), 24 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); diff --git a/chrome/settings.html b/chrome/settings.html index cdf20fa..533118d 100644 --- a/chrome/settings.html +++ b/chrome/settings.html @@ -3,10 +3,41 @@ Redirector Extension Settings @@ -15,31 +46,31 @@

Redirector

- -
-
- Redirect asdfasdfasdfasdfasdf to ælasdtasdasdt - Example: hsdtasdt st to -
-
-
- - - - - +
Go where YOU want!
+
+ +
+
- Enable Redirector - Show status bar icon - Show context menu - Enable debug output +

Configuration

+ Enabled + Statusbar icon + Context menu + Debug output
-- cgit v1.2.3-70-g09d2