#なんだかんだ
##えーと1 どういうこういう そういうどういう
##えーと2 どういうこういう そういうどういう
#なんだかんだ
##えーと1 どういうこういう そういうどういう
##えーと2 どういうこういう そういうどういう
var patcher = require('html-patcher') | |
var patch = patcher(document.body, render()) | |
setInterval(function () { | |
patch(render()) | |
}, 1000); | |
function render () { | |
return '<h1>' + Date.now() + '</h1>'; |
<!-- index.html --> | |
<html> | |
<head> | |
<title>Qiitaトレンド</title> | |
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css"> | |
<link href="http://nvd3.org/assets/css/nv.d3.css" rel="stylesheet" type="text/css"> | |
<style> | |
body { | |
overflow-y:scroll; | |
} |
// 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>", |
(function(){ | |
// ある関数について、最初に呼び出されたときと2回目以降で処理を分ける方法 | |
// 自分自身を書き換える関数 | |
// 初期化コストが低いが、見た目がイマイチ | |
// 関数宣言でなくても良いが、関数宣言なら定義する場所を気にしなくて良くなる | |
function A(){ | |
A = _A; | |
/*一回目の処理*/ | |
// _A.apply(this,arguments);//2回目の処理を呼ぶこともOK |
// ==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== |
// ==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); |
// ==UserScript== | |
// @name expand_twitter_notation | |
// @description はてなダイアリー編集中にtwitter記法を展開する | |
// @namespace http://shiba-yu36.net/ | |
// @include http://d.hatena.ne.jp/* | |
// ==/UserScript== | |
(function() { | |
function parseTweetId (string) { |
// ==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 をプラグインにロード */ |
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]); |