Skip to content

Instantly share code, notes, and snippets.

@Twilyze
Twilyze / nicoAddDeflist.js
Last active January 26, 2020 19:45
ニコニコ動画のマイリストから「とりあえずマイリスト」へまとめて移動(登録)させる https://twilyze.hatenablog.jp/entry/nico-mylist-move
(function() {
const startIndex = 0;
const mylistID = location.href.match(/https:\/\/www.nicovideo.jp\/my\/mylist\/#\/(\d+)/)[1];
function main(mylist) {
let i = startIndex;
let addCount = 0;
const len = mylist.mylistitem.length;
const wait = 5e3;
@Twilyze
Twilyze / EncodeURI.ahk
Last active August 28, 2021 17:21
Reproduce JavaScript encodeURI and encodeURIComponent functions using AutoHotkey. (v1.1.30.03)
EncodeURI(uri, excepts := "!#$&'()*+,-./:;=?@_~")
{
VarSetCapacity(str, StrPut(uri, "UTF-8"), 0)
StrPut(uri, &str, "UTF-8")
f := A_FormatInteger
SetFormat, IntegerFast, H
while code := NumGet(str, A_Index - 1, "UChar")
if (code >= 0x30 && code <= 0x39 ; 0-9
|| code >= 0x41 && code <= 0x5A ; A-Z
|| code >= 0x61 && code <= 0x7A ; a-z
@Twilyze
Twilyze / CHANGELOG.md
Last active August 12, 2021 10:28
はてなブログ向けのサイドバーで追尾する目次【ver3】 http://twilyze.hatenablog.jp/entry/sidebar-toc-3

3.4.1 - 2021/08/12

  • IE11で動作しない問題を修正

3.4.0 - 2021/08/12

  • リンクをクリックした時の動作を変更
    • 修飾キーなどの特別な操作時はスキップ
    • リンク先の要素にフォーカス
    • 目次タイトルを押した時の動作を他と揃えた
  • CSS修正
@Twilyze
Twilyze / hatenablog.css
Last active February 28, 2019 21:52
続・はてなブログのカスタマイズ http://twilyze.hatenablog.jp/entry/hatena-blog-custom3
@media screen and (min-width: 1139px) {
#content {
margin: 20px 55px 35px;
}
}
/* 記事のフォントサイズ */
.entry-content {
font-size: 100%;
line-height: 27px;
@Twilyze
Twilyze / hatenablog_sidebar_toc.css
Last active September 9, 2017 17:01
サイドバーに現在位置を表示して追尾する目次を設置する【目次記法対応版】 http://twilyze.hatenablog.jp/entry/hatena-blog-custom4
/* 目次(サイドバー) */
#sectionListSide ol {
padding: 0px;
margin: 0px;
list-style-type: none;
}
#sectionListSide ol .chapter {
padding-left: 10px;
}
#sectionListSide li > a {