Skip to content

Instantly share code, notes, and snippets.

View syoichi's full-sized avatar

Syoichi Tsuyuhara syoichi

View GitHub Profile
// ==UserScript==
// @name imitationLightbox
// @description Simple image viewer.
// @namespace http://d.hatena.ne.jp/Griever/
// @author Griever
// @gist https://gist.github.com/103061
// @license MIT License
// @compatibility Firefox 4, Chrome, Opera 11.50
// @include http://*
// @include https://*
// ==UserScript==
// @name add edit link on tumblr
// @namespace http://d.hatena.ne.jp/taizooo/
// @include http://*.tumblr.com/*
// @exclude http://www.tumblr.com/*
// ==/UserScript==
(function(){
function f(doc){
$X('.//a[@class="permalink"]', doc).forEach(function(a){
@ucnv
ucnv / README.md
Created May 3, 2009 09:01
Diff for gist.github
@satyr
satyr / gist_diff.user.js
Created May 5, 2009 22:40 — forked from ucnv/README.md
Diffs on Gist with google-diff-match-patch
// ==UserScript==
// @name gist diff
// @namespace http://github.com/satyr
// @description Shows diffs on Gist with google-diff-match-patch.
// @include https://gist.github.com/*
// @require https://raw.github.com/gist/105908
// @require https://google-diff-match-patch.googlecode.com/svn/trunk/javascript/diff_match_patch.js
// @fork_of http://gist.github.com/105913
// @check_also http://gist.github.com/107780
// ==/UserScript==
@satyr
satyr / gist_logs.user.js
Created May 6, 2009 22:13
Shows commit logs on Gist.
// ==UserScript==
// @name gist logs
// @namespace http://d.hatena.ne.jp/murky-satyr
// @description Shows commit logs on Gist.
// @include https://gist.github.com/*
// @license WTFPL
// ==/UserScript==
Array.forEach(document.querySelectorAll('#revisions .id'), function(a){
GM_xmlhttpRequest({
method: 'get', url: 'https://raw.github.com/gist'+ a.pathname +'/meta',
@os0x
os0x / diff_for_gist.user.js
Created May 12, 2009 13:19 — forked from ucnv/README.md
Diff for gist.github for Opera & Chrome
// ==UserScript==
// @name Diff for gist.github for Opera & Chrome
// @namespace http://ss-o.net/
// @include http://gist.github.com/*
// @include https://gist.github.com/*
// ==/UserScript==
(function(){
var f = function($) {
var rev = $('#revisions li');
models.register( {
name: 'HatenaDiary',
ICON: 'http://d.hatena.ne.jp/favicon.ico',
POST_URL : 'http://d.hatena.ne.jp',
check : function(ps){
return (/(regular|photo|quote|link)/).test(ps.type) && !ps.file;
},
converters: {
// Chat upload
// format sample
// http://utatane.tumblr.com/post/118386131/private-chat-format-test
(function(){
Tombloo.Service.extractors.register([
{ // Chat extractor
name : 'Chat',
ICON : models.Twitter.ICON,
TARGET_BACKGROUND : '#888',
function isCircular(obj) {
function isCircularWithAncestors(obj, ancestors) {
var k;
for (k in obj)
if (ancestors.indexOf(obj) >= 0 ||
obj[k] instanceof Object && isCircularWithAncestors(obj[k], ancestors.concat([obj])))
return true;
return false;
}
return obj instanceof Object && isCircularWithAncestors(obj, []);
<!doctype html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link rel="icon" href="{Favicon}"/>
<link rel="alternate" type="application/rss+xml" title="RSS" href="{RSS}"/>
<title>{Title}{block:PostSummary} - {PostSummary}{/block:PostSummary}</title>
<style type="text/css">
* {
font-size:100%;