-
Notifications
You must be signed in to change notification settings - Fork 3
/
KakuyomuAssistant.user.js
29 lines (25 loc) · 1.06 KB
/
KakuyomuAssistant.user.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// ==UserScript==
// @name 「」カクヨム助手
// @namespace https://github.com/jc3213/userscript
// @version 0.2
// @description 「」カクヨムのリーディング体験をより良くするためのツールです
// @author jc3213
// @match https://kakuyomu.jp/works/*/episodes/*
// ==/UserScript==
// Remove side navigator
document.querySelector('#content').classList.remove('contentAside-isShown');
// Wide content field
document.querySelector('div.widget-episode-inner').style['max-width'] = '50%';
// Content font to Meiryo
document.querySelector('div.widget-episodeBody').style['font-family'] = '"Segoe UI",Verdana,"メイリオ",Meiryo,sans-serif';
// Shortcut hotkey
document.addEventListener('keydown', event => {
switch (event.key) {
case 'ArrowLeft':
open(document.querySelector('#contentMain-previousEpisode > a').href.slice(0, -4), '_self');
break;
case 'ArrowRight':
open(document.querySelector('#contentMain-nextEpisode > a').href, '_self');
break;
}
});