Skip to content

Commit

Permalink
replaced browser extension stuff with bookmarklet
Browse files Browse the repository at this point in the history
  • Loading branch information
masukomi committed Jul 19, 2024
1 parent bd9a967 commit afe8669
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 30 deletions.
32 changes: 2 additions & 30 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -83,36 +83,8 @@
<!-- FOOTER -->
<div class="container non-essential" id="footer">
<div class="row">
<div class="col">
<a href="https://github.com/masukomi/backup_brain/"><%=t('navigation.source_link')%></a>
</div>
</div>
<div class="row">
<div class="col extension-links">
<span class="extension-link-container">
<%= icon_link("external/firefox", '#',
link_css: "extension-link",
icon_css: "extension-link",
alt: t('misc.browser_extensions.firefox_icon_alt'),
title: t('misc.browser_extensions.firefox_link')
)%>
</span>
<span class="extension-link-container">
<%= icon_link("external/chrome", '#',
link_css: "extension-link",
icon_css: "extension-link",
alt: t('misc.browser_extensions.chrome_icon_alt'),
title: t('misc.browser_extensions.chrome_link')
)%>
</span>
<span class="extension-link-container">
<%= icon_link("external/safari", '#',
link_css: "extension-link",
icon_css: "extension-link",
alt: t('misc.browser_extensions.safari_icon_alt'),
title: t('misc.browser_extensions.safari_link')
)%>
</span>
<div class="col bookmarklet">
<a href="javascript:url=location.href; if(document.getSelection){selection=document.getSelection();}else{selection='';}; title=document.title; void(open('<%= request.base_url %>/bookmarks/new?url='+encodeURIComponent(url)+'&description='+encodeURIComponent(selection)+'&title='+encodeURIComponent(title)+'&closeable=true&layout=webextension','Backup Brain','toolbar=no,width=800,height=550'));"><%= t('misc.bookmarklet.link_text') %></a> <%= t('misc.bookmarklet.inline_instructions') %>
</div>
</div>

Expand Down
3 changes: 3 additions & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@ en:
chrome_icon_alt: "Chrome logo"
safari_link: "Coming even less soon"
safari_icon_alt: "Safari logo"
bookmarklet:
link_text: "Brain It!"
inline_instructions: "← Drag this to you bookmarks toolbar for easy bookmarking."
sidebar:
page_actions_header: "Page Actions…"
accounts:
Expand Down
1 change: 1 addition & 0 deletions public/css/backup_brain.css
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ heading > .inline-icon{
}
.private-hint,
.file-a-ticket-link-icon,
.version-info,
#side-nav-items > li > a.file-a-ticket-link-icon{
font-style: italic;
font-size: 0.8rem;
Expand Down

0 comments on commit afe8669

Please sign in to comment.