Skip to content

Instantly share code, notes, and snippets.

@hail2u
hail2u / ldr-auto-fullscreen.user.js
Created October 31, 2009 21:17
livedoor Readerを自動的にフルスクリーンにする
// ==UserScript==
// @name ldR: Auto fullscreen
// @namespace http://hail2u.net/
// @description livedoor Readerを自動的にフルスクリーンにする
// @include http://reader.livedoor.com/reader/*
// ==/UserScript==
window.addEventListener("load", function (e) {
var w = unsafeWindow;
w.Control.toggle_leftpane();
@hail2u
hail2u / ldr-go-prev-next-feed-with-wheel.user.js
Created October 31, 2009 21:18
livedoor Readerでホイール・スクロールし切ると自動的に前後のフィードに移動する
// ==UserScript==
// @name ldR: Go prev/next feed with wheel
// @namespace http://hail2u.net/
// @description livedoor Readerでホイール・スクロールし切ると自動的に前後のフィードに移動する
// @include http://reader.livedoor.com/reader/*
// ==/UserScript==
window.addEventListener("load", function (e) {
var w = unsafeWindow;
var t = document.getElementById("right_container");
@hail2u
hail2u / ldr-show-first-feed.user.js
Created October 31, 2009 21:18
livedoor Readerにアクセスした時に最初のフィードを自動的に開く
// ==UserScript==
// @name ldR: Show first feed
// @namespace http://hail2u.net/
// @description livedoor Readerにアクセスした時に最初のフィードを自動的に開く
// @include http://reader.livedoor.com/reader/*
// ==/UserScript==
window.addEventListener("load", function (e) {
var w = unsafeWindow;
w.register_hook("after_subs_load", function () {
@hail2u
hail2u / ldr-skip-modified-items.user.js
Created November 1, 2009 06:17
livedoor Readerで更新されただけの記事は飛ばす。
// ==UserScript==
// @name ldR: Skip modified item
// @namespace http://hail2u.net/
// @description livedoor Readerで更新されただけの記事は飛ばす。
// @include http://reader.livedoor.com/reader/*
// ==/UserScript==
window.addEventListener("load", function (e) {
// これ以下の期間で更新された場合は飛ばさない設定(秒)
// デフォルトは3日、更新を全て飛ばしたい場合は1にする
@hail2u
hail2u / css.vim
Created November 6, 2009 17:58
http://www.vim.org/scripts/script.php?script_id=2150 にrgb()/rgba()のサポートを追加したもの
" Language: Colored CSS Color Preview
" Maintainer: Niklas Hofer <niklas+vim@lanpartei.de>
" URL: svn://lanpartei.de/vimrc/after/syntax/css.vim
" Last Change: 2008 Feb 12
" Licence: No Warranties. Do whatever you want with this. But please tell me!
" Version: 0.6
function! s:FGforBG(bg)
" takes a 6hex color code and returns a matching color that is visible
let pure = substitute(a:bg,'^#','','')
@hail2u
hail2u / sortcss.pl
Created November 14, 2009 03:26
CSSのプロパティを仕様書の順にソートするPerlスクリプト
#!/usr/bin/perl
# Author: Kyo Nagashima <kyo@hail2u.net>, http://hail2u.net/
# xaicron, http://blog.livedoor.jp/xaicron/
# License: MIT license (http://opensource.org/licenses/mit-license.php)
# Modified: 2009-11-17T23:09:27+09:00
use strict;
use warnings;
@hail2u
hail2u / hatena-bookmark-bookmarklet.user.css
Created December 4, 2009 17:22
はてなブックマークのブックマークレットによる投稿画面を使いやすくするユーザースタイルシート
/* Preview: http://www.flickr.com/photos/hail2u/4157658511/ */
@-moz-document url-prefix("http://b.hatena.ne.jp/add") {
* {
font-family: "Lucida Grande", "Calibri", sans-serif !important;
font-size: 100% !important;
}
body {
width: auto !important;
}
@hail2u
hail2u / hatena-bookmark-bookmarklet-2.user.css
Created December 9, 2009 08:33
はてなブックマークのブックマークレットによる投稿画面を使いやすくするユーザースタイルシート その2
/* Preview: http://www.flickr.com/photos/hail2u/4171474572/ */
.hatena-bookmark-bookmarklet-container {
padding: 0 !important;
display: table !important;
position: fixed !important;
top: 0 !important;
right: 0 !important;
bottom: 0 !important;
left: 0 !important;
width: 100% !important;
@hail2u
hail2u / lightboxed-hatena-bookmark-bookmarklet.user.js
Created December 10, 2009 04:01
Chrome向けのはてなブックマークのブックマークレットをLightbox化するユーザースクリプト
// ==UserScript==
// @name Lightboxed Hatena Bookmark Bookmarklet
// @namespace http://hail2u.net/
// @description はてなブックマークのブックマークレットをLightbox化する
// @include http://*
// @include https://*
// ==/UserScript==
GM_addStyle(".hatena-bookmark-bookmarklet-container { padding: 0 !important; display: table !important; position: fixed !important; top: 0 !important; right: 0 !important; bottom: 0 !important; left: 0 !important; width: 100% !important; height: 100% !important; background-color: transparent !important;}");
GM_addStyle(".hatena-bookmark-bookmarklet-container div { padding: 0 !important; background-image: none !important; text-align: center !important;}");
@hail2u
hail2u / gccs.pl
Created December 11, 2009 14:10
Google Closure Compiler Serviceを使ってtest.jsのようなJavaScriptファイルをコンパイル(最適化)。
#!/usr/bin/env perl
# gccs.pl - Compile your JavaScript code with Google Closure Compiler Service
# Usage: gccs.pl < <original file> > <compiled file>
# License: http://hail2u.mit-license.org/2009
# Modified: 2012-01-04T18:43:15+09:00
use strict;
use warnings;