pon
https://gyazo.com/69c8ac0d2b6aebe24399488c8ba19f75
pon / Takahiro Ono
Technical Artist, CG animator, Visual artist
Links
User scripts
Emoji Selector
code:script.js
import '/api/code/yutaro/emoji_selector/script.js'
重要なところ(太字要素を全て抜き出し)
code:script.js
const __bkmClass = 'strong' /* ここで記法のセレクタを設定してね。デフォルトはドットです */
const __bkmMenuTitle = 'Highlights'
scrapbox.PageMenu.addMenu({ title: __bkmMenuTitle, image: '/assets/img/logo_cut.svg',
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)
}
})
})
}
})
Code Sandbox
code:style.css
/* @import "/api/code/helpfeel-template/settings/style.css"; */
@import "/api/code/helpfeel-template/gyazo-image-alert/index.css";
.project-home .title {
&:before, &:after {
content: '';
}
}
code:script.js.disable