const __bkmClass = '.deco-\\.';

const __bkmMenuTitle = 'Bookmarks';
scrapbox.PageMenu.addMenu({
  title: __bkmMenuTitle,
  image: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQI12NgYAAAAAMAASDVlMcAAAAASUVORK5CYII=',
  onClick: function() {
    const __fixedHeaderHeight = ($('.navbar').css('position') == 'fixed' ? $('.navbar').height() : 0) + ($('.navbar-pagemenu').height() || 0);
    scrapbox.PageMenu(__bkmMenuTitle).removeAllItems();
    $(__bkmClass).closest('.line').each(function(i, e) {
      scrapbox.PageMenu(__bkmMenuTitle).addItem({
        title: $(e).find(__bkmClass).text(),
        onClick: function() {
          $('html,body').animate({
            scrollTop: $(e).offset().top - $('body').offset().top - __fixedHeaderHeight
          }, 150);
        }
      });
    });
  }
});
// 選択した文字列にマーカー
scrapbox.PopupMenu.addButton({
  title: 'マーカー',
  onClick: text => `[[${text}]]`
});

scrapbox.PopupMenu.addButton({
  title: '付箋',
  onClick: text => `[[~ ${text}]]`
});

scrapbox.PopupMenu.addButton({
  title: 'しおり',
  onClick: text => `[[. ${text}]]`
});

@@ -994,17 +994,16 @@
 xt =%3E %60%5B
-%5B
 ~ $%7Btext
@@ -996,33 +996,32 @@
  =%3E %60%5B~ $%7Btext%7D%5D
-%5D
 %60%0A%7D);%0A%0Ascrapbox.
@@ -1079,17 +1079,16 @@
 xt =%3E %60%5B
-%5B
 . $%7Btext
@@ -1081,23 +1081,22 @@
  =%3E %60%5B. $%7Btext%7D%5D
-%5D
 %60%0A%7D);%0A

Fix scrapbox special tag