This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
const linkify = function(node){ | |
split(node); | |
function split(n){ | |
if(['style', 'script', 'textarea', 'select', 'button', 'a'].includes(n.localName)) return; | |
if(n.nodeType === Node.TEXT_NODE){ | |
let pos = n.data.search(linkify.RE); | |
if(0 <= pos){ | |
let target = n.splitText(pos);/*pos直前までのnとpos以降のtargetに分割*/ | |
let rest = target.splitText(RegExp.lastMatch.length);/*targetと続くrestに分割*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
let name = location.href.match(/twitter\.com\/([^/]+)\//)[1]; | |
let match = document.querySelector('a[href$="#source-labels"]').parentNode.firstElementChild.textContent.match(/([0-9]+)年([0-9]+)月([0-9]+)日/); | |
let date = new Date(`${match[1]}-${match[2]}-${match[3]}`) - 0, since = new Date(date - 1000*60*60*24).toISOString().substr(0,10), until = new Date(date + 1000*60*60*24).toISOString().substr(0,10); | |
location.assign(`https://twitter.com/search?q=from%3A${name}%20since%3A${since}%20until%3A${until}&f=live`); | |
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
const target = window; | |
const search = /search/; | |
const type = { | |
key: true, | |
value: true, | |
}; | |
const scan = function(t, path = '', chain = [t]){ | |
//console.log(path); | |
switch(true){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name LogTest | |
// @namespace knoa.jp | |
// @include http*://knoa.jp/ | |
// ==/UserScript== | |
(function parent(){ | |
const SCRIPTNAME = 'LogTest'; | |
const DEBUG = true; | |
const log = function(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
ニコニコ動画のコメントをまとめて投稿するブックマークレットです。 | |
下記のコードの冒頭のコメント部分を「#1:23 コメント内容」の形式で自由に書き換えてください。 | |
ブラウザのアドレスバーに手入力で javascript: と打ってから、コード全体(8-17行目)を貼り付けて、Enterしてください。 | |
# あらかじめニコニコのコマンド欄に shita などのコマンドを書いておくと、すべてのコメントに適用されます。 | |
# テスト用動画 https://www.nicovideo.jp/watch/sm30996075 | |
*/ | |
(function(){const a=` | |
#0:00 うp乙 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function FindProxyForURL(url, host){ | |
switch(true){ | |
/*いまいましい音付き広告を拒否*/ | |
case dnsDomainIs(host, '2mdn.net'): | |
case dnsDomainIs(host, 'cmertv.com'): | |
case dnsDomainIs(host, 'cxense.com'): | |
case dnsDomainIs(host, 'microad.jp'): | |
case dnsDomainIs(host, 'socdm.com'): | |
case dnsDomainIs(host, 'teads.tv'): | |
case dnsDomainIs(host, 'uliza.jp'):/*TVerのCMに使われるのでTVerを見るなら外す必要があるかも*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@-moz-document regexp("^http:\/\/live2\.nicovideo\.jp\/watch\/.*") { | |
/* 映像+コメントリストをもっと大きく live2 バージョン */ | |
/****display:none****/ | |
/*2017/8(htmlの属性値がどの画面モードでも共通になってしまった)*/ | |
[class*="page-head-area"]/*サイトロゴと検索とバナー広告*/, | |
[class*="program-head-area"]/*生放送タイトル*/, | |
[class*="wall"]/*両脇大広告*/, | |
[class*="operator-area"]/*empty*/, | |
[class*="player-head-area"]/*empty*/, | |
[class*="player-foot-area"]/*empty*/, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
const COUNT = 1000000; | |
const FINAL = 1; | |
const SORT = false; | |
let tournament = [ | |
[ | |
[ | |
[ | |
{name: '村山慈明', rate: 1737}, | |
{name: '三枚堂達也', rate: 1760}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* タブを閉じる(CloseTabLater) */ | |
(function(){ | |
const DELAY = 5*1000; | |
const OPACITY = '0.5'; | |
let current = gBrowser.mCurrentTab; | |
/* 最後のタブだったら素直に閉じる */ | |
if(gBrowser.mTabContainer.childElementCount === 1) return gBrowser.removeTab(current); | |
/* 現在のタブに閉じる運命を与える */ | |
let label = 'CloseTabLater-' + Date.now() + DELAY; | |
if(!('CloseTabLaters' in window)) window.CloseTabLaters = []; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name ShogiDB2 DownloadLinkCreator | |
// @description 将棋DB2の検索結果一覧ページに棋譜ダウンロードボタンを追加します。 | |
// @include https://shogidb2.com/latest* | |
// @include https://shogidb2.com/floodgate* | |
// @include https://shogidb2.com/tournament/* | |
// @include https://shogidb2.com/player/* | |
// @include https://shogidb2.com/strategy/* | |
// @require https://cdn.rawgit.com/polygonplanet/encoding.js/master/encoding.min.js | |
// @namespace knoa.jp |
NewerOlder