Index: trunk/lib/Bookmarks/bookmark.tt
===================================================================
--- trunk/lib/Bookmarks/bookmark.tt	(revision 118)
+++ trunk/lib/Bookmarks/bookmark.tt	(revision 119)
@@ -2,19 +2,5 @@
   <head>
     <title>Bookmark: [% bookmark.title or bookmark.uri %]</title>
-    <style type="text/css">
-body, th, td {
-    font-size: .875em;
-}
-h1 {
-  font-size: 1.25em;
-}
-li {
-    margin-bottom: .5em;
-}
-th {
-    text-align: right;
-    font-weight: normal;
-}
-    </style>
+    <link rel="stylesheet" type="text/css" href="assets/bookmark.css"/>
   </head>
   <body>
Index: trunk/lib/Bookmarks/list.tt
===================================================================
--- trunk/lib/Bookmarks/list.tt	(revision 118)
+++ trunk/lib/Bookmarks/list.tt	(revision 119)
@@ -3,89 +3,5 @@
     <title>[% title %]</title>
     <base href="[% base_url %]"/>
-    <style type="text/css">
-a:hover {
-    text-decoration: none;
-}
-.edit {
-    font-size: .85em;
-}
-input, select {
-    font-size: .875em;
-    font-family: 'DejaVu Sans', sans-serif;
-}
-body, th, td {
-    margin: 0;
-    font-size: .75em;
-    font-family: 'DejaVu Sans', sans-serif;
-}
-ul {
-    margin: 0;
-    padding: 0;
-}
-ul.main {
-    height: 60%;
-    border-top: 6px solid #eee;
-    border-bottom: 6px solid #eee;
-}
-.alternate-links {
-    margin: .5em .25em;
-}
-.alternate-links li {
-    display: inline;
-}
-.alternate-links li+li:before {
-    content: ' | ';
-    color: #ccc;
-}
-.refine {
-    height: 15%;
-}
-.refine form {
-    margin: 0;
-}
-.buttons {
-    margin: .5em;
-}
-.cotags {
-    height: 75%;
-    border-top: 1px dotted #999;
-    border-bottom: 1px dotted #999;
-}
-ul.main, ul.cotags {
-    overflow-y: scroll !important;
-}
-li {
-    padding: .25em 0 0 .25em;
-    color: #999;
-    white-space: nowrap;
-    list-style-type: none;
-}
-th {
-    text-align: right;
-    font-weight: normal;
-}
-form {
-    margin: .5em;
-}
-p {
-    margin: .5em;
-}
-.tags a {
-    color: #999;
-    text-decoration: none;
-}
-.tags a:hover {
-    text-decoration: underline;
-}
-.tags {
-    color: #999;
-    margin-top: .125em;
-    margin-left: 3em;
-    font-size: .875em;
-}
-.pagination {
-    margin: .5em;
-}
-    </style>
+    <link rel="stylesheet" type="text/css" href="assets/list.css"/>
   </head>
   <body>
@@ -161,4 +77,5 @@
       </p>
     </div>
+    <script src="assets/list.js"></script>
   </body>
 </html>
Index: trunk/lib/Bookmarks/list_core.tt
===================================================================
--- trunk/lib/Bookmarks/list_core.tt	(revision 118)
+++ trunk/lib/Bookmarks/list_core.tt	(revision 119)
@@ -3,5 +3,5 @@
     <li>
       <span class="edit">
-	(<a href="[% resource.id %]" onclick="window.open(this.href, 'edit_bookmark', 'width=800,height=250').focus(); return false;">Edit</a>)
+	(<a href="[% resource.id %]" class="edit-bookmark">Edit</a>)
       </span>
       <a href="[% resource.uri | html %]" title="[% resource.title | html %] ([% resource.tags.join(', ') %])">[% resource.title or resource.uri %]</a>
Index: trunk/lib/BookmarksApp.pm
===================================================================
--- trunk/lib/BookmarksApp.pm	(revision 118)
+++ trunk/lib/BookmarksApp.pm	(revision 119)
@@ -42,4 +42,6 @@
 use Plack::Request;
 use Router::Resource;
+use File::Basename qw{dirname};
+use File::Spec::Functions qw{catfile};
 
 use Bookmarks::Controller;
@@ -156,4 +158,8 @@
                 },
             ) if $config->{auth};
+            enable 'Static', (
+                path => qr{^/assets/},
+                root => catfile(dirname(__FILE__), 'htdocs'),
+            );
             sub { $router->dispatch(shift); };
         }
Index: trunk/lib/htdocs/assets/bookmark.css
===================================================================
--- trunk/lib/htdocs/assets/bookmark.css	(revision 119)
+++ trunk/lib/htdocs/assets/bookmark.css	(revision 119)
@@ -0,0 +1,13 @@
+body, th, td {
+    font-size: .875em;
+}
+h1 {
+  font-size: 1.25em;
+}
+li {
+    margin-bottom: .5em;
+}
+th {
+    text-align: right;
+    font-weight: normal;
+}
Index: trunk/lib/htdocs/assets/list.css
===================================================================
--- trunk/lib/htdocs/assets/list.css	(revision 119)
+++ trunk/lib/htdocs/assets/list.css	(revision 119)
@@ -0,0 +1,83 @@
+a:hover {
+    text-decoration: none;
+}
+.edit {
+    font-size: .85em;
+}
+input, select {
+    font-size: .875em;
+    font-family: 'DejaVu Sans', sans-serif;
+}
+body, th, td {
+    margin: 0;
+    font-size: .75em;
+    font-family: 'DejaVu Sans', sans-serif;
+}
+ul {
+    margin: 0;
+    padding: 0;
+}
+ul.main {
+    height: 60%;
+    border-top: 6px solid #eee;
+    border-bottom: 6px solid #eee;
+}
+.alternate-links {
+    margin: .5em .25em;
+}
+.alternate-links li {
+    display: inline;
+}
+.alternate-links li+li:before {
+    content: ' | ';
+    color: #ccc;
+}
+.refine {
+    height: 15%;
+}
+.refine form {
+    margin: 0;
+}
+.buttons {
+    margin: .5em;
+}
+.cotags {
+    height: 75%;
+    border-top: 1px dotted #999;
+    border-bottom: 1px dotted #999;
+}
+ul.main, ul.cotags {
+    overflow-y: scroll !important;
+}
+li {
+    padding: .25em 0 0 .25em;
+    color: #999;
+    white-space: nowrap;
+    list-style-type: none;
+}
+th {
+    text-align: right;
+    font-weight: normal;
+}
+form {
+    margin: .5em;
+}
+p {
+    margin: .5em;
+}
+.tags a {
+    color: #999;
+    text-decoration: none;
+}
+.tags a:hover {
+    text-decoration: underline;
+}
+.tags {
+    color: #999;
+    margin-top: .125em;
+    margin-left: 3em;
+    font-size: .875em;
+}
+.pagination {
+    margin: .5em;
+}
Index: trunk/lib/htdocs/assets/list.js
===================================================================
--- trunk/lib/htdocs/assets/list.js	(revision 119)
+++ trunk/lib/htdocs/assets/list.js	(revision 119)
@@ -0,0 +1,10 @@
+function edit_bookmark(event) {
+    window.open(this.href, 'edit_bookmark', 'width=800,height=250').focus();
+    event.preventDefault();
+    return false;
+}
+
+var bookmark_links = document.querySelectorAll('.edit-bookmark');
+for (var i = 0; i < bookmark_links.length; i++) {
+    bookmark_links.item(i).addEventListener('click', edit_bookmark);
+}
