Skip to content

Commit

Permalink
[bookmarklets] Add bookmarklet to retry search on Google
Browse files Browse the repository at this point in the history
  • Loading branch information
lovett committed Nov 5, 2018
1 parent 4a7e445 commit 80c014f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions apps/bookmarklets/bookmarklets.jinja.html
Expand Up @@ -10,6 +10,12 @@
</div>
{%- endmacro %}

{% macro inline_bookmarklet(js, label) -%}
<div class="bookmarklet-container">
<a href="javascript:{{ js|e }}">{{ macros.bookmarkletIcon }} {{ label }}</a>
</div>
{%- endmacro %}

{% block stylesheets %}
{{ macros.cacheBustedStylesheet('bookmarklets', 'css/bookmarklets.css') }}
{% endblock %}
Expand All @@ -23,6 +29,9 @@
<main>
<div class="content-wrapper">
<dl>
<dt>{{ inline_bookmarklet("location='https://www.google.com/#' + location.search.slice(1).split('&').filter(function(v) { return v.startsWith('q=') })", "google") }}</dt>
<dd>Retry a web search on Google</dd>

<dt>{{ bookmarklet_url("validate.js", "validate") }}</dt>
<dd>Submit the current page to the W3C HTML validator</dd>

Expand Down

0 comments on commit 80c014f

Please sign in to comment.