Permalink
Browse files

Include source

  • Loading branch information...
1 parent cb95e97 commit 7a18a3ea99df4521ecbc226fbcd3f89cb46db6dc @nakajima committed Nov 15, 2009
Showing with 13 additions and 0 deletions.
  1. +7 −0 app/views/bookmarklets/show.html.erb
  2. +1 −0 app/views/layouts/bookmarklets.html.erb
  3. +5 −0 public/stylesheets/styles.css
@@ -7,6 +7,13 @@ Drag this to your Bookmarks Bar:
<blockquote><%= @bookmarklet.description %></blockquote>
+<%= link_to_function 'View Source', '$("source").toggle()' %>
+
+<div id="source" style="display:none">
+ <pre><%= CGI.escapeHTML(@bookmarklet.code) %></pre>
+</div>
+
+<br>
<%= link_to 'Click Here to Edit', edit_bookmarklet_path(@bookmarklet) if @bookmarklet.password? %>
@@ -6,6 +6,7 @@
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
<title>Bookmarklets: <%= controller.action_name %></title>
<%= stylesheet_link_tag 'styles' %>
+ <%= javascript_include_tag 'prototype' %>
</head>
<body>
@@ -58,6 +58,11 @@ textarea {
margin: 1em 0;
}
+#source {
+ font-size: 14px;
+ padding: 1em;
+}
+
#the-list {
padding: 4px;
margin-top: 20px;

0 comments on commit 7a18a3e

Please sign in to comment.