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 getParentBlock(el) { | |
for (let p = el; p; p = p.parentNode) { | |
const style = window.getComputedStyle(p, null); | |
if (style && style.getPropertyValue("display") !== "inline") { | |
return p; | |
} | |
} | |
return null; | |
} |
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.from(document.getElementsByTagName("video")).find(el => /^blob/.test(el.src)).webkitSetPresentationMode("picture-in-picture"); |
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
javascript:c='オケオケオッケー';l=130;r='';p=c.split('');for(i=0;i<l;i++){r+=p[~~(Math.random()*p.length)];if(r.substr(p.length*-1)==c)break;}l==i?r+='\nFailed':r+='\n'+(i+1)+'回目の試行で成功';location.href='https://twitter.com/intent/tweet?text='+encodeURIComponent(r); |
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
/***** Niconico Mylist Search ブックマークレット ***** | |
ニコニコ動画のマイリストをインクリメンタルサーチします。 | |
@auther : moroya http://moroya.hatenablog.jp/ | |
@license: MIT License | |
*/ | |
(function($){ | |
if(location.href.indexOf('www.nicovideo.jp/my/mylist') === -1) { | |
if(window.confirm('このページはニコニコ動画の\nマイリストページではありません\nマイリストページへジャンプしますか?')) { | |
location.href="http://www.nicovideo.jp/my/mylist"; |
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(){ | |
var total = {}; | |
var year = '2012'; | |
var all = false; | |
function init(num) { | |
if(typeof num !== 'number') { | |
num = 0; | |
$('<div/>').css({ | |
position: 'fixed', | |
left: 0, |
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
<VirtualHost *:80> | |
ServerName example.net | |
DocumentRoot "/var/html/www/" | |
<Directory "/var/html/www/"> | |
Order Allow,Deny | |
Allow from All | |
AllowOverride All | |
Options FollowSymLinks | |
</Directory> |
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
### Section 1: Global Environment | |
### Apache全体に影響を及ぼすセクション | |
# Apacheのパス | |
ServerRoot "/etc/httpd" | |
# ポート番号の指定 | |
Listen 80 | |
# 同時接続数 |
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
var imgs = document.querySelectorAll('a[href*="jpg"], a[href*="gif"], a[href*="png"]'); | |
for(var i=0;i<imgs.length;i++) { | |
dispatchMouseEvents({ type:'click', altKey:true, target:imgs[i], button:0 }); | |
} | |
function dispatchMouseEvents(opt) { | |
var evt = document.createEvent('MouseEvents'); | |
evt.initMouseEvent(opt.type, opt.canBubble||true, opt.cancelable||true, opt.view||window, | |
opt.detail||0, opt.screenX||0, opt.screenY||0, opt.clientX||0, opt.clientY||0, |
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
var page = require('webpage').create(); | |
var system = require('system'); | |
// 引数を引っ張る | |
var address = system.args[1]; | |
var output = system.args[2]; | |
var delay = Number(system.args[3]); | |
// ビューポートのサイズ | |
page.viewportSize = { |
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
// first | |
function first() { | |
var df = $.Deferred(); | |
setTimeout(function(){ | |
console.log('first'); | |
df.resolve(); | |
}, 1000); | |
return df.promise(); |
NewerOlder