Skip to content

yusukebe/marks

Repository files navigation

🔖 Marks

Bookmark App with Cloudflare Workers.

You can deploy your own Marks to the Cloudflare Workers.

Screenshots

SS

Add Bookmark from shortcuts of macOS:

SS

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

SS

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

About

Bookmarks App with Cloudflare Workers.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published