aboutsummaryrefslogtreecommitdiffstats
path: root/views/index.html.erb
blob: c41c0ad7e2a83f18363091c2d85226e997d216ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<div id="details">
    Grab the bookmarklet: <a href="javascript:(function(){var xhr=new XMLHttpRequest();var params='url='+window.location.href;xhr.open('POST','<%= "#{@env['rack.url_scheme']}://#{@env['HTTP_HOST']}" %>/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? %>
    <ul id="clips">
        <% @clips.each do |c| %>
            <li>
                <a href="<%= c.url %>">
                    <%= c.url %>
                </a>
            </li>
        <% end %>
    </ul>
<% else %>
    No clips to display
<% end %>