増井俊之
リストのサイズバーを消す
last modified / last visited などのメニューも消える
style.css__.quick-launch .right-box {
display: none;
}
.quick-launch .private-badge {
display: none;
}
style.css__.unread {
border-color: #333 !important;
}
div.page {
opacity: 0.93;
}
li.page-list-item {
opacity: 0.93;
}
codeblockのフォントを小さくする
style.css__span.code-block {
line-height: 20px;
font-size: 88%;
}
codeblockの頭を静かな色にする
style.css__.line span.code-block .code-block-start {
background-color: #ccc;
}
.line span.code-block .code-block-start a {
color: #555;
}
style.css__/* #で始まるタグをラベル風にする */
a[type="hashTag"]{
display: inline-block;
padding: 2px 8px;
margin: 0 8px 10px 0;
background: #fff;
color: #f27e48;
font-size: 0.8em;
border: 1px solid #f27e48;
border-radius: 3px;
transition: .3s;
-webkit-transform: scale(1);
transform: scale(1);
}
a[type="hashTag"]:hover{
-webkit-transform: scale(1.1);
transform: scale(1.1);
}
script.js__$('head > link[rel=icon]').attr('href','/api/pages/icons/Nota/icon');
現在位置を取得
script.js__import '/api/code/Nota/Geolocation%20watchPositionで現在位置を取得するUserScript/script.js'
新規作成ボタンを消す
style.css__.new-button { /* 新規ボタンを消す */
visibility: hidden;
}
Enterキーで新規ページ作成
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`;
}
});
style.css__/* 1. Scrapboxアイコンをバーガーアイコンに置き換え */
.brand-icon { display: none !important }
.navbar-brand::before {
content: '\f0c9'; font-family: FontAwesome; font-size: 28px; color: #bbbbbb; }
style.css__.navbar-default { /* 検索フォームの色 */
background-color: #aaa;
}
form { /* 検索フォームの枠 */
border:1px #ddd solid;
}
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 }
}
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) } }
style.css .deco-\= {
color: #111;
background-color: #ffddff;
padding: 0.1em 0.2em 0.1em 0.2em;
}
script.jsfunction 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',
image: 'https://gyazo.com/5441ee8eb0bf51650a91751e48669c21/thumb/48',
onClick: () => {
var sneaky = Function('return(function(){' + strict() + '})()');
sneaky();
}
})
script.jsimport '/api/code/masui/ScrapCalc/script.js'
style.css@import '/api/code/masui/ScrapCalc/style.css';