Skip to content

Instantly share code, notes, and snippets.

@t-f-m
t-f-m / gist:893182
Created March 29, 2011 20:29
XPathの動作確認
<html>
<head>
<script>
//utilities via AutoPagerize
function getElementsByXPath(xpath, node) {
var nodesSnapshot = getXPathResult(xpath, node,
XPathResult.ORDERED_NODE_SNAPSHOT_TYPE)
var data = []
for (var i = 0; i < nodesSnapshot.snapshotLength; i++) {
data.push(nodesSnapshot.snapshotItem(i))
@t-f-m
t-f-m / ldrize.user.js.patch
Created September 11, 2011 06:49
LDRizeのindicator表示位置バグ修正
diff --git a/LDRize_original.user.js b/LDRize.user.js
index c791643..2ba446f 100644
--- a/LDRize_original.user.js
+++ b/LDRize.user.js
@@ -437,7 +437,7 @@ LDRize.prototype = {
if(!p)return;
var i=this.img.indicator;
i.style.display = 'block';
- i.style.top = (p.y+this.getScrollHeight()-DEFAULT_HEIGHT) + 'px';
+ i.style.top = (p.y+this.scrollHeight) + 'px';
@t-f-m
t-f-m / ldrize.user.js.patch
Created September 11, 2011 06:50
LDRizeの#gm_ldrize_pinlistの横幅を制限
diff --git a/LDRize.user.js b/LDRizeB.user.js
index 2ba446f..aae6571 100644
--- a/LDRize.user.js
+++ b/LDRizeB.user.js
@@ -345,6 +345,7 @@ LDRize.prototype = {
if(CSS_HIGHLIGHT_LINK) css += "\n.gm_ldrize_link {" + CSS_HIGHLIGHT_LINK + "}";
if(CSS_HIGHLIGHT_PINNED) css += "\n.gm_ldrize_pinned {" + CSS_HIGHLIGHT_PINNED + "}";
css += ".gm_ldrize_iframe { min-height:200px; position:fixed; bottom:0px; left:0px; right:0px; }";
+ css += "#gm_ldrize_pinlist { max-width:300px; }";
return css;
@t-f-m
t-f-m / nitenddo_president_interviewer_with_autopagerize.user.js
Created November 20, 2011 22:58
「社長が訊く」をAutoPagerizeで読んだときの2ページ目以降の文字欠けを何とかする
// ==UserScript==
// @name Nintendo president interviwer with autopagerize
// @namespace http://d.hatena.ne.jp/t_f_m/
// @description 「社長が訊く」内の文字欠けを何とかする
// @include http://www.nintendo.co.jp/*/interview/*
// ==/UserScript==
function boot(){
window.AutoPagerize = window.AutoPagerize || sharedObject.AutoPagerize;
//sharedObjectによる一部オブジェクト共有
//グリモン版を使う場合細工済みのもののみ可
@t-f-m
t-f-m / thread_sample.patch
Created March 8, 2012 02:44
http://www.kmonos.net/alang/boost/classes/thread.html のsampleからboost::ref依存を追い出す
--- test_urger_thread_old.cpp 2012-03-08 11:42:42.570478359 +0900
+++ test_urger_thread.cpp 2012-03-08 11:43:04.921728796 +0900
@@ -1,6 +1,5 @@
#include <iostream>
#include <string>
-#include <boost/ref.hpp>
#include <boost/thread.hpp>
using namespace std;
@@ -15,7 +14,7 @@
@t-f-m
t-f-m / autopagerize_filter_for_.user.js
Created May 6, 2012 19:26 — forked from kurumigi/autopagerize_filter_for_.user.js
[GM script]AutoPagerize Filter for NAVER matome / NAVERまとめに、AutoPagerizeが適用されるようにします。
// ==UserScript==
// @name AutoPagerize Filter for NAVER matome
// @namespace http://d.hatena.ne.jp/kurumigi/
// @description NAVERまとめに、AutoPagerizeが適用されるようにします。(Apply "AutoPagerize" to NAVER matome.)
// @include http://matome.naver.jp/*
// @include http://matome.naver.jp/odai/*
// @version 0.1
// ==/UserScript==
// Idea of this script based on "misc.AutoPagerize"(http://d.hatena.ne.jp/os0x/20090109/1231489489).
@t-f-m
t-f-m / LDRize.20120610.diff
Created June 10, 2012 18:02
LDRizeをFirefox13で動かす
diff --git a/LDRize.user.js b/LDRize_mod.user.js
index 128fa25..ae7cabd 100644
--- a/LDRize.user.js
+++ b/LDRize_mod.user.js
@@ -7,7 +7,7 @@
// @include file:///*
// ==/UserScript==
-const SCRIPT_VERSION = "2011.11.11" //sharedObject
+const SCRIPT_VERSION = "2012.06.10" //sharedObject and RegExp
@t-f-m
t-f-m / autopagerize.user.js
Created March 10, 2013 13:33
AutoPagerize for greasemonkey siteinfoを山ほど書きたしたローカルのバックアップ
// ==UserScript==
// @name AutoPagerize
// @namespace http://swdyh.yu.to/
// @description loading next page and inserting into current page.
// @include http://*
// @include https://*
// @exclude https://mail.google.com/*
// @exclude http://b.hatena.ne.jp/*
// @exclude http://www.facebook.com/plugins/like.php*
// @exclude http://api.tweetmeme.com/button.js*
@t-f-m
t-f-m / imas_cg_solo_live_supporter.user.js
Last active December 18, 2015 00:09
モバマス単騎凸サポーター
// ==UserScript==
// @name mbga single attack supporter
// @namespace http://d.hatena.ne.jp/t_f_m/
// @include http://sp.pf.mbga.jp/12008305/*
// ==/UserScript==
var api = 'http://dojo.sekai.in/api/2/query.json';
// thanks for @sekai67
// http://momoka-sakurai.com/docs/dojolist_api_v2.html
var domain = 'http://sp.pf.mbga.jp/12008305/';
var params = '?url=http%3A%2F%2F125.6.169.35%2Fidolmaster%2Fbattles%2Fbattle_check%2F';
@t-f-m
t-f-m / tombfix.service.capture.covreingframes.js
Created December 19, 2013 21:02
キャプチャ時にembedないしobjectを含むiframe、frameにカバーをかける(※作りかけ)
(function(){
var advice = function(proceed, args, target, methodName){
var ctx = args[0];
makeOpaqueFlash(ctx.document);
var doc = ctx.document;
innerDocs = $x('//*[self::iframe or self::frame]', doc, true);
innerDocs.forEach(function(frame){
if($x('//*[self::embed or self::object]', frame.contentWindow.document, true).length){
var style = window.getComputedStyle(frame);