(ファイルが見つかりませんと言われることがある。ディレイが必要かもしれない)
This file contains hidden or 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 jqMansions = $('.rMansion'); | |
const maxAge = Number.parseInt(prompt('最大築年数', '38')); | |
if (Number.isNaN(maxAge)) { | |
if (confirm('フィルタを解除しますか?')) { | |
jqMansions.each(function() { this.style.display = 'block'; }); | |
} | |
return; | |
} | |
jqMansions.each(function() { |
This file contains hidden or 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() { | |
function makeEl(tag, id, opts) { | |
const el = document.createElement(tag); | |
if (id) el.id = id; | |
if (opts) { | |
opts.class && (el.className = opts.class); | |
opts.text && (el.innerText = opts.text); | |
if (opts.attrs) { | |
Object.keys(opts.attrs).forEach(key => el.setAttribute(key, opts.attrs[key])); | |
} |
This file contains hidden or 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
Array.prototype.forEach.call(document.querySelectorAll('#g-items>li'), item => { | |
var params = item.dataset.repositionActionParams; | |
var asin = params ? params.match(/ASIN:(\w+)\|/)[1] : 'なし'; | |
var htmlAnchor = `<a href="https://www.google.co.jp/search?q=${asin}" target="_blank">ASIN:${asin}</a>`; | |
if (item.isInsertedASIN) { | |
item.querySelector('.item-asin').innerHTML = htmlAnchor; | |
} else { | |
item.insertAdjacentHTML('beforeend', '<div class="item-asin">' + htmlAnchor + '</div>'); | |
item.isInsertedASIN = true; | |
} |
This file contains hidden or 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
// TweetDeckの読み込み後に一度だけ実行してください。 | |
// 実行のトリガは手動で開発者ツールやアドレスバーに突っ込んだりBTDを改造したり色々やってください。 | |
// 動作不良による損害には一切責任を負いません。 | |
const USERNAME_NOT_CONFIRM_RT = 'USERNAME'; | |
new MutationObserver(mutations => { | |
mutations.forEach(mutation => { | |
Array.prototype.some.call(mutation.addedNodes, node => { | |
if (!(node instanceof Element)) return false; | |
const modal = node; |
This file contains hidden or 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() { | |
function map(arr, fn) { | |
return Array.prototype.map.call(arr, fn); | |
} | |
const textStyle = ` | |
#flowtoc { | |
position: fixed; | |
right: 0px; | |
bottom: 0px; |
This file contains hidden or 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 url = document.getElementById('my-canvas-object').toDataURL('image/png'); | |
const outer = document.createElement('div'); | |
outer.setAttribute('style', 'position:fixed; top:0; left:0; right:0; text-align:center;'); | |
const img = document.createElement('img'); | |
img.setAttribute('style', 'background-color:white;'); | |
img.src = url; | |
img.addEventListener('click', function() { | |
document.body.removeChild(outer); | |
}); |
This file contains hidden or 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
$('.novel-items:nth(0) ._novel-item').toArray().map(el => { | |
const charstext = el.querySelector('.chars').innerText; | |
const title = el.querySelector('.title a'); | |
const user = el.querySelector('.user'); | |
return { | |
bookmarkID: Number.parseInt(el.querySelector('input[name="book_id[]"]').value), | |
cover: el.querySelector('.cover').src, | |
chars: Number.parseInt(charstext.substr(0, charstext.length - 2).replace(',', '')), | |
bookmarks: Number.parseInt(el.querySelector('.bookmark-count').innerText), | |
title: title.innerText, |