Skip to content

Instantly share code, notes, and snippets.

View syoichi's full-sized avatar

Syoichi Tsuyuhara syoichi

View GitHub Profile
// 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;
}
@os0x
os0x / dollarX.js
Created July 30, 2008 07:12 — forked from cho45/dollarX.js
simple $X
// 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 || "";
});
@snj14
snj14 / dollarX.js
Created August 3, 2008 12:03 — forked from cho45/dollarX.js
complex $X
// $X
//
// usage:
//
// $X(aExpression);
// $X(aExpression, aContext, aType);
// $X(aExpression, aContext, aType, aResolver, aNamespaceHash);
// $X(aNamespaceHash, aResolver, aType, aContext, aExpression);
//
// or
@Constellation
Constellation / dashboard_plus_tombloo.user.js
Created August 12, 2008 04:23
userscript : Dashboard + Tombloo
// ==UserScript==
// @name Dashboard + Tombloo
// @namespace http://d.hatena.ne.jp/Constellation/
// @description register reblog command by Tombloo
// @include http://www.tumblr.com/dashboard*
// @include http://www.tumblr.com/show*
// @include http://www.tumblr.com/iphone*
// ==/UserScript==
//
// Detail : Pinned-node Reblog
// ==UserScript==
// @name LDR NG
// @namespace http://d.hatena.ne.jp/zaknak/20080909/1220936155
// @include http://reader.livedoor.com/reader/*
// @include http://fastladder.com/reader/*
// @version 0.0.12
// ==/UserScript==
var w = (typeof unsafeWindow == 'undefined') ? window : unsafeWindow;
@taizooo
taizooo / Endless_Summer_on_dsbd.user.js
Created November 18, 2008 17:04
Endless Summer on Tumblr Dashboard
// ==UserScript==
// @name Endless Summer on dsbd
// @namespace http://www.tumblr.com/
// @description random next link on tumblr dashboard
// @include http://www.tumblr.com/dashboard/1*
// @include http://www.tumblr.com/show/*/1*
// @require https://raw.github.com/gist/3242
// @require https://raw.github.com/gist/198443
// @require https://raw.github.com/gist/34615
// @version 0.0.4.0.4
@os0x
os0x / dollarX.js
Created November 27, 2008 04:17 — forked from cho45/dollarX.js
very simple $X
// 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++) {
// wedata utility for Greasemonkey
// usage
/*
// ==UserScript==
// @name foo bar
// @namespace http://baz.com
// @require http://gist.github.com/raw/34615/04333b7e307eb029462680e4f4cf961f72f4324c
// ==/UserScript==
javascript: (function(_HaH) {
var originalTitle = document.title;
var hintKeys = new String('asdfghjkl');
var choices = [];
var choice = '';
var xpath = '//a[@href]|//input[not(@type=\x22hidden\x22)]|//textarea|//select|//img[@onclick]|//button';
xpath += '|' + xpath.replace(/\/\//g, '//xhtml:');
var defaultType = 'HaHxlink';
function defaultAction(e) {
e.focus();
// ==UserScript==
// @name fastladder_show_fc2_images.user.js
// @namespace http://d.hatena.ne.jp/edvakf/
// @description Make fc2 images viewable on LDR/Fastladder
// @include http://reader.livedoor.com/reader/
// @include http://reader.livedoor.com/public/*
// @include http://fastladder.com/reader/
// ==/UserScript==
(function(w,d){