petrosh / gitmarks

Select and click the bookmark on a page to store
https://petrosh.github.io/gitmarks
0 stars 3 forks source link

gitmarks

Bookmarks text selections as issues

What

  1. Browse and select text
  2. Click bookmark
  3. Add labels
  4. Manage and Search bookmarks in the repository issues page

How

  1. Fork https://github.com/petrosh/gitmarks
  2. Make a commit to build gh-pages: edit README.md
  3. Browse to https://<yourusername>.github.io/gitmarks
  4. Drag the bookmarklet on your toolbar

Why

Bookmarklets add one-click functions to a browser or web page.

javascript:(function(s){
  // ...
})();
function (s) {
  try {
    s = document.selection.createRange().text
  } catch(_) {
    s = document.getSelection()
  }
  location.href = "https://github.com/petrosh/gitmarks/issues/new?title=" +
  encodeURIComponent(document.title) +
  "&body=" + encodeURIComponent(location) +
  String.fromCharCode(37) + "0A---" + String.fromCharCode(37) + "0A" +
  encodeURIComponent(s)
}