Skip to content

Instantly share code, notes, and snippets.

View moroya's full-sized avatar

moroya moroya

View GitHub Profile
@moroya
moroya / aitter.js
Last active December 18, 2015 00:39
Amazon ikuratukatter
(function(){
var total = {};
var year = '2012';
var all = false;
function init(num) {
if(typeof num !== 'number') {
num = 0;
$('<div/>').css({
position: 'fixed',
left: 0,
@moroya
moroya / nico_mylist_search.js
Created October 17, 2013 15:15
Niconico Mylist Search ブックマークレット(GINZA)
/***** 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";
@moroya
moroya / okokok.js
Last active December 27, 2015 11:19
「オケオケオッケー」の中からランダムに文字列を返して、130回以内に「オケオケオッケー」に一致する文字列が出たら[それまでの試行結果]+"\n"+n+"回目の試行で成功" 出なかったら[それまでの試行結果]+"\nFailed" とツイートするクソコード
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);
@moroya
moroya / prime-video-pip.js
Created October 24, 2019 13:11
MacのSafariでPrime Videoを再生しながらコンソールにコピペするとピクチャーインピクチャーで再生してくれるコード
Array.from(document.getElementsByTagName("video")).find(el => /^blob/.test(el.src)).webkitSetPresentationMode("picture-in-picture");
@moroya
moroya / fix-translate.js
Created December 23, 2023 06:22
ChromeのGoogle翻訳で <code> タグの語順がおかしくなるのを修正するブックマークレット
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;
}