Skip to content

Instantly share code, notes, and snippets.

@Griever
Griever / JK_Walker.user.js
Created May 7, 2012 12:53
LDRize like JK scroll.
// ==UserScript==
// @name JK Walker
// @description LDRize like JK scroll.
// @namespace http://d.hatena.ne.jp/Griever/
// @license MIT License
// @compatibility Firefox 12
// @version 0.0.1
// @include http://**
// @include https://*
// @exclude http://reader.livedoor.com/*
@Griever
Griever / komono.js
Created April 25, 2012 12:59
komono
// 最後に開いたサイドバーを記憶してトグル
window.toggleSidebar_org = window.toggleSidebar;
eval("window.toggleSidebar = " + window.toggleSidebar_org.toString()
.replace(/if \(!commandID\) \{[^}]+}/, <![CDATA[
var lastcommand = sidebarBox.getAttribute("sidebarcommand") ||
sidebarBox.getAttribute("sidebarlastcommand") ||
"viewBookmarksSidebar";
sidebarBox.setAttribute('sidebarlastcommand', lastcommand);
document.persist("sidebar-box", "sidebarlastcommand");
if (!commandID) {
@Griever
Griever / ichimatsu.css
Created April 15, 2012 15:33
画像の背景を市松模様にするCSS
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document url-prefix(data:image/),
regexp(".*\.(jpe?g|png|gif|bmp|svg|JPE?G|PNG|GIF|BMP|SVG)([?#].*)?$") {
body {
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAAAAABWESUoAAAAHUlEQVQ4y2P4gQYeoAGGUQUjSgG6ALqGUQUjSgEAdjWwLh+tpFgAAAAASUVORK5CYII=") !important;
}
body > img[src][alt] {
box-shadow: 0px 0px 2px 1px navy;
}
@Griever
Griever / DocumentMap.uc.js
Created March 30, 2012 14:47
スクロールバーにページの全貌を表示する
// ==UserScript==
// @name DocumentMap.uc.js
// @description スクロールバーにページの全貌を表示する
// @namespace http://d.hatena.ne.jp/Griever/
// @author Griever
// @license MIT License
// @compatibility Firefox 11
// @charset UTF-8
// @include main
// @version 下書き1
@Griever
Griever / abp_jp2urlfilter.ini.js
Created February 22, 2012 09:12
Adblock のフィルタを urlfilter.ini に変換する
javascript:(function(){
/*
Adblock のフィルタを urlfilter.ini に変換する
ついてに広告カット CSS も作成
https://adblock-plus-japanese-filter.googlecode.com/hg/abp_jp.txt で実行
|| で始まる行は http, https の2行に、^ は "/*" に、$のある行はスルー。
CSS は -moz-document を使っている部分があるので Opera では前半のみ利用可能
*/
@Griever
Griever / BookmarksIconic.css
Created February 1, 2012 09:34
ブックマーク登録メニューにスターボタンのようなアイコンを付ける
@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);
/*
CSS だけでできたヽ(´ー`)ノ…できてなかった><
*/
#context-bookmarkpage,
/*#context-bookmarkframe,
#context-bookmarklink,*/
#menu_bookmarkThisPage {
-moz-binding: url("chrome://global/content/bindings/menu.xml#menuitem-iconic") !important;
}
@Griever
Griever / iContextMenu.uc.js
Created January 26, 2012 08:19
冗長な右クリックメニューを纏めるテスト
// ==UserScript==
// @name iContextMenu.uc.js
// @description 冗長な右クリックメニューを纏める
// @namespace http://d.hatena.ne.jp/Griever/
// @author Griever
// @license MIT License
// @compatibility Firefox 10
// @charset UTF-8
// @include main
// @version 下書き3
@Griever
Griever / Pano.uc.js
Created November 16, 2011 15:16
Panoのサイドバーでタブのコンテキストメニューを使えるようにする
// ==UserScript==
// @name Pano++
// @description Panoのサイドバーでタブのコンテキストメニューを使えるようにする
// @namespace http://d.hatena.ne.jp/Griever/
// @author Griever
// @include chrome://pano/content/sidebar.xul
// @compatibility Firefox 5
// @version 0.0.1
// ==/UserScript==
@Griever
Griever / selectionLinkNewGrope.js
Created August 3, 2011 13:35
選択範囲内のリンクを新しいタブグループで開く
// 選択範囲内のリンクを新しいタブグループで開く
// こんな感じでいいんだろうか
(function() {
var win = document.commandDispatcher.focusedWindow;
if (!win || win == window) win = content;
var sel = win.getSelection();
var urls = [];
for (var i = 0, len = sel.rangeCount; i < len; i++) {
Array.forEach(sel.getRangeAt(i).cloneContents().querySelectorAll('a:not(:empty)'), function(a){
if (urls.indexOf(a.href) === -1)
@Griever
Griever / TRBLSidebar.uc.js
Created July 7, 2011 15:09
サイドバーを上下左右に移動させます
// ==UserScript==
// @name TRBLSidebar
// @description サイドバーを上下左右に移動させます
// @namespace http://d.hatena.ne.jp/Griever/
// @author Griever
// @license MIT License
// @compatibility Firefox 5
// @charset UTF-8
// @include main
// @version 0.0.1