増井俊之
https://i.gyazo.com/ce44a0adde8a39df00cfa744d8f42d95.png
code:style.css
.navbar .kamon {
display: none;
}
リストのサイズバーを消す
last modified / last visited などのメニューも消える
code:style.css__
.quick-launch .right-box {
display: none;
}
.quick-launch .private-badge {
display: none;
}
code:style.css__
.unread {
border-color: #333 !important; }
div.page {
opacity: 0.93;
}
li.page-list-item {
opacity: 0.93;
}
codeblockのフォントを小さくする
code:style.css__
span.code-block {
line-height: 20px;
font-size: 88%;
}
codeblockの頭を静かな色にする
code:style.css__
.line span.code-block .code-block-start {
}
.line span.code-block .code-block-start a {
}
code:style.css__
/* #で始まるタグをラベル風にする */
display: inline-block;
padding: 2px 8px;
margin: 0 8px 10px 0;
font-size: 0.8em;
border-radius: 3px;
transition: .3s;
-webkit-transform: scale(1);
transform: scale(1);
}
-webkit-transform: scale(1.1);
transform: scale(1.1);
}
code:script.js__
$('head > linkrel=icon').attr('href','/api/pages/icons/Nota/icon'); 現在位置を取得
code:script.js__
import '/api/code/Nota/Geolocation%20watchPositionで現在位置を取得するUserScript/script.js'
新規作成ボタンを消す
code:style.css__
.new-button { /* 新規ボタンを消す */
visibility: hidden;
}
Enterキーで新規ページ作成
code:script.js__
$('body').on('keydown',function(e){ // Enterキーで新規ページ作成
if(e.target.tagName != "TEXTAREA" && e.target.tagName != "INPUT"){
if(e.key == 'Enter'){
var project = location.href.split('/')3; location.href = /${project}/new;
}
}
});
/* $('.btn.btn-default').on('click',function(){ */
$('button').on('click',function(){
var s = $('.form-control').val();
if(s == ''){
var project = location.href.split('/')3; location.href = /${project}/new;
}
});
code:style.css__
/* 1. Scrapboxアイコンをバーガーアイコンに置き換え */
.brand-icon { display: none !important }
.navbar-brand::before {
content: '\f0c9'; font-family: FontAwesome; font-size: 28px; color: #bbbbbb; } code:style.css__
.navbar-default { /* 検索フォームの色 */
}
form { /* 検索フォームの枠 */
}
code:style.css__
/* はりつくメニューバー */
/* @media screen and (min-height: 600px) and (min-width: 768px) { */
@media screen {
body:not(.presentation) { padding-top: 90px; padding-right: 0 !important }
body:not(.presentation) .page-menu { position: fixed; top: 90px }
.navbar { position: fixed; top: 0; left: 0; right: 0; z-index: 990; overflow: unset }
.dropdown.open .dropdown-menu {
position: absolute; left: auto; top: auto;
max-height: calc(100vh - 100px); overflow-y: auto }
.dropdown.open .dropdown-menu.global-menu { left: 0; top: 54px }
.page-menu .dropdown.open .dropdown-menu { position: absolute; top: 0 }
}
code:style.css__
/* プロジェクトTOPへのリンクと周辺パーツを強引にnavbarに移動 */
/* ※次のnavbar固定と同時に使う必要がある */
@media screen and (min-width: 768px) {
.quick-launch .project-home {
position: fixed; top: 7px; left: calc((100% - 1080px)/2); z-index: 990 }
/*.page { padding-top: 0 }*/ }
@media screen and (min-width: 768px) and (max-width: 991px) {
.quick-launch .project-home { left: 65px } }
@media screen and (min-width: 992px) and (max-width: 1260px) {
.quick-launch .project-home { left: 80px } }
@media screen and (min-width: 1261px) {
.quick-launch .project-home { left: calc((100% - 1260px)/2 + 80px) } }
code:style.css
.deco-\= {
padding: 0.1em 0.2em 0.1em 0.2em;
}
code:script.js
function strict(){
var commands = [];
let count = 0;
for(let expr of document.querySelectorAll('.deco-\\=')){
let text = expr.innerText;
if(text.match(/=/)){
commands.push(decodeURI(text) + ';');
}
else {
let processed = false;
for(let e of expr.children){
let id = scrapcalc_element_id_${count};
e.id = id;
if(processed){
commands.push(document.getElementById("${id}").innerHTML = "";);
}
else {
processed = true;
commands.push(document.getElementById("${id}").innerHTML = "<span style='font-style:italic;font-weight:bold;'>"+(${decodeURI(text)})+"</span>";);
}
count += 1;
}
}
}
return commands.join("\n");
}
scrapbox.PageMenu.addMenu({
title: 'ScrapCalc',
onClick: () => {
var sneaky = Function('return(function(){' + strict() + '})()');
sneaky();
}
})
code:script.js
import '/api/code/masui/ScrapCalc/script.js'
code:style.css
@import '/api/code/masui/ScrapCalc/style.css';