marks

Bookmarks App with Cloudflare Workers.

MIT License

Stars
24
Committers
1

🔖 Marks

Bookmark App with Cloudflare Workers.

You can deploy your own Marks to the Cloudflare Workers.

Screenshots

Add Bookmark from shortcuts of macOS:

Prerequisites

Install

$ git clone https://github.com/yusukebe/marks.git
$ cd marks
$ yarn install

Setting

Rename wrangler.toml:

$ mv wrangler.example.toml wrangler.toml

Make KV namespace id:

$ wrangler kv:namespace create BOOKMARK

🌀 Creating namespace with title "marks-BOOKMARK"
✨ Success!
Add the following to your configuration file in your kv_namespaces array:
{ binding = "BOOKMARK", id = "your id" }

Edit wrangler.toml:

kv_namespaces = [
  { binding = "BOOKMARK", id = "your id" }
]

Set your Basic Auth username and password:

$ wrangler secret put NAME
$ wrangler secret put PASS

Build&Deploy

$ wrangler publish

macOS Shortcuts

Bookmarklet

javascript: (function () {
  var url = document.location.href
  var links = document.getElementsByTagName('link')
  for (i in links) {
    if (links[i].rel) {
      if (links[i].rel.toLowerCase() == 'canonical') {
        url = links[i].href
      }
    }
  }
  var redirect =
    'https://{app-name}.{your-name}.workers.dev/?url=' + encodeURIComponent(url)
  location.href = redirect
})()

Author

Yusuke Wada https://github.com/yusukebe

License

MIT

Related Projects