Skip to content

Instantly share code, notes, and snippets.

// @example getParentHanders($('#hogehoge'))
function getParentHandlers(element, result){
if(!element) return result;
element = $(element)[0];
result = result || [];
var handlers = $._data(element, 'events');
if(handlers) result.push({element: element, handlers: handlers});
return getParentHandlers(element.parentElement, result);
}
@tkrkt
tkrkt / SlideShare-FixCharacterReference.user.js
Last active August 29, 2015 14:23
SlideShareのテキスト文字参照化を直すグリモン
// ==UserScript==
// @name SlideShare-FixCharacterReference
// @namespace jp.tkrkt
// @include http://www.slideshare.net/*
// @version 1
// @grant none
// ==/UserScript==
//https://gist.github.com/myaumyau/4975024
function hexNumRefToString(hexNumRef) {
@tkrkt
tkrkt / SumCommitLines.user.js
Last active August 29, 2015 14:23
BitBucketのコミットページでコミット全体の行数プラマイ出すグリモン
// ==UserScript==
// @name SumCommitLines
// @namespace jp.tkrkt
// @include https://bitbucket.org/**/commits/*
// @version 1
// @grant none
// ==/UserScript==
var container = document.getElementById('commit-files-summary');
@tkrkt
tkrkt / gist-link.user.js
Last active February 14, 2019 13:18
Add Gist link on GitHub profile page
@tkrkt
tkrkt / getPropertyDescriptor.js
Last active February 25, 2016 05:19
getPropertyDescriptor
function getPropertyDescriptor(obj, key, path) {
path = path || [];
path.push(obj);
if (obj.hasOwnProperty(key)) {
var descriptor = Object.getOwnPropertyDescriptor(obj, key);
descriptor.path = path;
descriptor.owner = obj;
return descriptor;
} else if (key in obj){
return getPropertyDescriptor(obj.__proto__, key, path);
#!/bin/sh
json=`curl -s "https://api.trello.com/1/lists/[list-id]]/cards?key=[key]&token=[token]"`
echo ${json} | /usr/local/bin/jq -r '"ToDo: " + .[0].name'
echo '---'
echo ${json} | /usr/local/bin/jq -r '.[].name'
@tkrkt
tkrkt / TrelloCardSelector.user.js
Last active March 28, 2016 15:04
Trelloで何もカード選択してない時でもカーソルキー効くようにするグリモン
// ==UserScript==
// @name TrelloCardSelector
// @namespace jp.tkrkt
// @description フォーカスしてない時でもキーボードでカードを選択
// @include https://trello.com/b/*/*
// @version 1.1
// @grant none
// ==/UserScript==
@tkrkt
tkrkt / MyGists.user.js
Last active September 26, 2016 02:15
Add "MyGists" link to GitHub Gist's header
// ==UserScript==
// @name MyGists
// @namespace jp.tkrkt
// @description Add MyGists Button on Gist
// @include https://gist.github.com/*
// @version 3
// @grant none
// ==/UserScript==
var meta = document.querySelector('meta[name=user-login]');
@tkrkt
tkrkt / feedly-sort-by-engagement.user.js
Last active May 24, 2019 07:14 — forked from paulegan/bookmarklet.js
[userscript] [Feedly] Add "Sort by engagement" button to Feedly
// ==UserScript==
// @name [Feedly] Sort by engagement
// @namespace https://gist.github.com/tkrkt
// @description Add "Sort by engagement" button to header
// @include https://feedly.com/*
// @version 8
// @grant none
// ==/UserScript==
function watch(callback) {
@tkrkt
tkrkt / qiita-stock-ranking-link.user.js
Last active November 30, 2016 05:33
Add "Stock Ranking" link to Qiita's tags page