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
// $XA | |
// | |
// $XA(exp, context, resolver)(function(node){}); | |
function $XA(exp, context, resolver) { | |
context || (context = document); | |
var XPE = new XPathEvaluator(); | |
var Doc = context.ownerDocument || context, expr = XPE.createExpression(exp, resolver ? resolver : | |
Doc.documentElement.namespaceURI ? function(prefix) { | |
return XPE.createNSResolver(Doc.documentElement).lookupNamespaceURI(prefix) || | |
context.namespaceURI || document.documentElement.namespaceURI || ""; |
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 usericonize favotter | |
// @namespace http://fuba.moarningnerds.org/ | |
// @include http://favotter.matope.com/* | |
// ==/UserScript== | |
// http://userscripts.org/scripts/show/37064 | |
var usericonize = function (root) { | |
setTimeout(function(){ |
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 usericonize favotter for Opera | |
// @namespace http://fuba.moarningnerds.org/ | |
// @include http://favotter.matope.com/* | |
// ==/UserScript== | |
(function(){ | |
var loaded = {}; | |
document.addEventListener('load',function(e) { | |
if (e.target.src) loaded[e.target.src] = true;//読み込み済みの画像URLにフラグを立てる |
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 b.hatena ldrizer | |
// @namespace http://ss-o.net/ | |
// @include http://b.hatena.ne.jp/* | |
// ==/UserScript== | |
setTimeout(function(unsafeWindow) { | |
if (unsafeWindow.Hatena && unsafeWindow.Hatena.Bookmark && unsafeWindow.Hatena.Bookmark.AutoPagerize && unsafeWindow.Hatena.Bookmark.AutoPagerize.instance && window.LDRize && window.Minibuffer) { | |
var autopager = unsafeWindow.Hatena.Bookmark.AutoPagerize.instance; | |
autopager.oldAddEventListener('complete',function(){ |
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
// very simple version of $X | |
// $X(exp); | |
// $X(exp, context, resolver, XPathResult.NUMBER_TYPE).numberValue; | |
// @source https:/raw.github.com/gist/29681 | |
function $X (exp, context, resolver, result_type) { | |
context || (context = document); | |
var Doc = context.ownerDocument || context; | |
var result = Doc.evaluate(exp, context, resolver, result_type || XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); | |
if (result_type) return result; | |
for (var i = 0, len = result.snapshotLength, res = new Array(len); i < len; 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 twitter post fix | |
// @namespace http://ss-o.net/ | |
// @include http://twitter.com/home* | |
// ==/UserScript== | |
// Opera で Twitter に POST 出来るようにする UserJS | |
// 適当な実装で、別のバグを生み出すかもしれないので、怪しいと思ったら外してください。。 | |
/* // 本家がバグを修正したので、このUserJSはもはや不要です。。 | |
document.addEventListener('DOMContentLoaded',function(){ |
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
if (!Array.prototype.reduce) | |
{ | |
Array.prototype.reduce = function(fun /*, initial*/) | |
{ | |
var len = this.length; | |
if (typeof fun != "function") | |
throw new TypeError(); | |
// no value to return if no initial value and an empty array | |
if (len == 0 && arguments.length == 1) |
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 duration (dat) { | |
var ret = 0, map = { | |
sec:1, min:60, hour:3600, day:86400, week:604800, month:2592000, year:31536000 | |
}; | |
for (var k in dat) if (map[k]) ret += dat[k] * map[k]; | |
return ret * 1000; | |
} | |
/* | |
function eq (obj, expect) { |
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 with hatebu search | |
// @namespace http://b.hatena.ne.jp/ | |
// @description google 検索の画面で、はてブ検索へのナビゲーションを出します | |
// @include http://www.google.co.jp/search* | |
// @include http://www.google.com/search* | |
// ==/UserScript== | |
(function () { | |
var tr = $X('//tr[td/input[@name="q"]]'); |