Permalink
Browse files

Use dollars.js

  • Loading branch information...
dv committed Jan 19, 2012
1 parent 8ff8ebc commit da7679deb17ad51944743d48747be536ac63c415
Showing with 2 additions and 13 deletions.
  1. +0 −13 static/hookscope.js
  2. +2 −0 static/index.html
View
@@ -11,19 +11,6 @@ function createRequestView(request) {
return $($("#request-template").data("compiled")(request));
}
-_.filterKeys = function(collection, keys) {
- var results = {};
-
- _.each(collection, function(value, key) {
- if (_.include(keys, key)) {
- results[key] = value;
- }
- });
-
- return results;
-}
-
-
// Compile all the templates
$(function() {
$("[type='text/template']").each(function(index, element) {
View
@@ -7,6 +7,7 @@
<script src="jquery.customslide.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.2.2/underscore-min.js"></script>
<script src="jquery.easydate-0.2.4.min.js"></script>
+ <script src="dollars.js"></script>
<script src="hookscope.js"></script>
<style type="text/css">
body {
@@ -33,6 +34,7 @@ <h3><%- url.href %></h3>
</thead>
<tbody>
<% _.each(_.filterKeys(headers, ["user-agent", "content-length"]), function(value, key) { %>
+ <% _.each($$.filterKeys(headers, ["user-agent"]), function(value, key) { %>
<tr>
<th><%- key %></th>
<td><%- value %></td>

0 comments on commit da7679d

Please sign in to comment.