aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2013-04-07 01:29:46 -0400
committerTeddy Wing2013-04-07 01:29:46 -0400
commit793535261248be90908681b6712f29e1a02da579 (patch)
tree3c6915c31e60056a314ff449146d1b86d059eaac
parentf6abae326cb768133b3e45b44092c2803bfb937d (diff)
downloadclips-793535261248be90908681b6712f29e1a02da579.tar.bz2
Change bookmarklet code to dynamically grab request URI
-rw-r--r--views/index.html.erb2
1 files changed, 1 insertions, 1 deletions
diff --git a/views/index.html.erb b/views/index.html.erb
index cb5b103..351c34a 100644
--- a/views/index.html.erb
+++ b/views/index.html.erb
@@ -1,5 +1,5 @@
<div>
- <a href="javascript:(function(){var xhr=new XMLHttpRequest();var params='url='+window.location.href;xhr.open('POST','http://localhost:9292/clips',true);xhr.onreadystatechange=function(){if(this.readyState==4){if(xhr.status==200){if(xhr.responseText.success){}}}};xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded');xhr.send(params);})()" onclick="alert('Drag this link onto your browser bookmarks bar.'); return false;">Clips</a>
+ <a href="javascript:(function(){var xhr=new XMLHttpRequest();var params='url='+window.location.href;xhr.open('POST','<%= @env['REQUEST_URI'] %>clips',true);xhr.onreadystatechange=function(){if(this.readyState==4){if(xhr.status==200){if(xhr.responseText.success){}}}};xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded');xhr.send(params);})()" onclick="alert('Drag this link onto your browser bookmarks bar.'); return false;">Clips</a>
</div>
<% unless @clips.empty? %>