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
// XML (E4X)からDOM Nodeへの変換 | |
function e4xToDOM(xml, xmlns) { | |
// DTD 無指定の場合 | |
if(!xmlns) xmlns = "http://www.w3.org/1999/xhtml"; | |
var pretty = XML.prettyPrinting; | |
// 余分な空白を混入させないように,prettyPrintingを一時的に無効にする | |
XML.prettyPrinting = false; | |
var doc = (new DOMParser).parseFromString( | |
'<root xmlns="' + xmlns + '">' + xml.toXMLString() + "</root>", |
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(){ | |
// ある関数について、最初に呼び出されたときと2回目以降で処理を分ける方法 | |
// 自分自身を書き換える関数 | |
// 初期化コストが低いが、見た目がイマイチ | |
// 関数宣言でなくても良いが、関数宣言なら定義する場所を気にしなくて良くなる | |
function A(){ | |
A = _A; | |
/*一回目の処理*/ | |
// _A.apply(this,arguments);//2回目の処理を呼ぶこともOK |
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 Twitter OAuth Caution | |
// @namespace http://github.com/mooz/ | |
// @description Display caution when application requests a 'write' access | |
// @include http://twitter.com/oauth/authorize?* | |
// @include http://twitter.com/oauth/authenticate?* | |
// @include https://twitter.com/oauth/authorize?* | |
// @include https://twitter.com/oauth/authenticate?* | |
// ==/UserScript== |
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
// wedata utility for Greasemonkey | |
// usage | |
/* | |
var DATABASE_URL = 'http://wedata.net/databases/XXX/items.json'; | |
var database = new Wedata.Database(DATABASE_URL); | |
database.get(function(items) { | |
items.forEach(function(item) { | |
// do something | |
}); | |
}); |
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 A smart dashboard have my id | |
// @namespace jp.mitukiii.tumblr | |
// @include http*://www.tumblr.com/dashboard* | |
// ==/UserScript== | |
(function() { | |
var getMyId = document.getElementsByName("t")[0].value; | |
var isPost = function(elem) { | |
return !!elem.id.match(/^post[0-9]+$/i); |
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 expand_twitter_notation | |
// @description はてなダイアリー編集中にtwitter記法を展開する | |
// @namespace http://shiba-yu36.net/ | |
// @include http://d.hatena.ne.jp/* | |
// ==/UserScript== | |
(function() { | |
function parseTweetId (string) { |
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 twicli post canceler | |
// @namespace http://efcl.info/ | |
// @description twicliのポストを行うのに5秒の猶予を設けて、その間にキャンセルボタンを押せばポストをキャンセルできます。 | |
// @author azu | |
// @homepage http://efcl.info/ | |
// @twitter https://twitter.com/azu_re | |
// ==/UserScript== | |
/* http://gist.github.com/567983.txt をプラグインにロード */ |
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
var dispatcher = { | |
location: window.location, | |
stash : [], | |
connect: function(paths, action) { | |
if (paths || paths === 0) { | |
paths = paths.valueOf(); | |
if (!(typeof paths == 'object' && !(paths instanceof RegExp))) // webkit: typeof RegExp == 'function' | |
paths = { pathname: paths }; | |
dispatcher.stash.push([paths, action]); |
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
var embedReply, tweetCache = {}; | |
(function () { | |
// APIが足りない時用proxy(気休め) | |
var proxies = [ | |
{ | |
url: twitterAPI + 'statuses/show/{id}.json?suppress_response_codes=true', | |
filter: function (d) { | |
return d | |
} |
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 TogetterFilter | |
// @namespace TogetterFilter | |
// @description Togetterを任意のユーザー名を用いてフィルタリング | |
// @include http://togetter.com/* | |
// @require https://github.com/azu/usconfig/raw/v1.13/usconfig.js | |
// ==/UserScript== | |
// 設定画面の定義 - http://d.hatena.ne.jp/h1mesuke/20100713/p1 | |
Config.define('usc_basic', function() { | |
with (this.builder) { |
OlderNewer