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 gist.user.js | |
// @namespace http://github.com/hotchpotch | |
// @description install greasemonkey (user.js) | |
// @include http://gist.github.com/* | |
// @include https://gist.github.com/* | |
// ==/UserScript== | |
(function() { | |
$X('id("files")//div[@class="info"]/span').forEach(function(e) { |
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 gist.user.js | |
// @namespace http://github.com/hotchpotch | |
// @description install greasemonkey (user.js) | |
// @include http://gist.github.com/* | |
// @include https://gist.github.com/* | |
// ==/UserScript== | |
(function() { | |
$X('id("files")//div[@class="info"]/span').forEach(function(e) { |
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
// Simple $X | |
// Thx! $X from http://coderepos.org/share/browser/lang/javascript/userscripts/jautopagerize.user.js | |
// http://subtech.g.hatena.ne.jp/cho45/20071114/1195017746 | |
function $X (exp, context) { | |
context || (context = document); | |
var exp = (context.ownerDocument || context).createExpression(exp, function (prefix) { | |
return (document.createNSResolver((context.ownerDocument == null | |
? context : context.ownerDocument).documentElement) | |
.lookupNamespaceURI(prefix) || 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 replace star by profile icon | |
// @namespace http://ss-o.net/ | |
// @description replace star by profile icon (for Firefox3) | |
// @include http://*.hatena.ne.jp/* | |
// @version 1.3 | |
// ==/UserScript== | |
location.href = 'javascript:(' + function(){ | |
var COLOR = true; |
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
// extend version of $X | |
// $X(exp); | |
// $X(exp, context); | |
// $X(exp, type); | |
// $X(exp, context, type); | |
function $X (exp, context, type /* want type */) { | |
if (typeof context == "function") { | |
type = context; | |
context = null; | |
} |
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
// simple version of $X | |
// $X(exp); | |
// $X(exp, context); | |
// @source https:/raw.github.com/gist/3242 | |
function $X (exp, context) { | |
context || (context = document); | |
var expr = (context.ownerDocument || context).createExpression(exp, function (prefix) { | |
return document.createNSResolver(context.documentElement || context).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 MDC relink | |
// @namespace http://d.hatena.ne.jp/Constellation/ | |
// @description relink MDC | |
// @include http://developer.mozilla.org/* | |
// ==/UserScript== | |
(/http:\/\/developer\.mozilla\.org\/(.+)\/(ja|en)$/i.test(document.location.href)) && (document.location.href = 'http://developer.mozilla.org/'+RegExp.$2+'/'+RegExp.$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
/* | |
// Tweener Like snippet | |
new Tween(div.style,{time:1, onComplete:function(){},left:{to:0,from:100,tmpl:"+$#px"}}); | |
// @require http://gist.github.com/13572.txt | |
*/ | |
function Tween(item, opt) { | |
var self = this, TIME = 10, time = (opt.time||1) * 1000, TM_EXP = /(\+)?\$([\#\d])/g, sets = [], | |
easing = opt.transition || function(t, b, c, d){return c*t/d + b;}, _T = {time:1,onComplete:1,transition:1,delay:1}; | |
for (var k in opt) if (!_T[k]) { | |
var set = opt[k], from = set.from || parseFloat(item[k]) || 0, values = [], tmpl = set.tmpl || '$#'; |
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 gist.user.js | |
// @namespace http://github.com/hotchpotch | |
// @description install greasemonkey (user.js) | |
// @include http://gist.github.com/* | |
// @include https://gist.github.com/* | |
// @require http://gist.github.com/3242.txt | |
// ==/UserScript== | |
(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++) { |
OlderNewer