This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env ruby | |
# Google Chromeの「パッケージ化されていない拡張機能を読み込む」機能で拡張を | |
# ロードした時のIDを、拡張のディレクトリのパスから割り出す。 | |
# 参考: http://supercollider.dk/2010/01/calculating-chrome-extension-id-from-your-private-key-233 | |
def gen_id (path) | |
require "digest" | |
hash = Digest::SHA256.hexdigest(File.absolute_path(path)) | |
hash[0...32].tr("0-9a-f", "a-p") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title></title> | |
<script> | |
(function(){ | |
chrome.bookmarks.getChildren("1", function(res){ | |
res.forEach(function(bookmark){ | |
if(bookmark.url === "dummy://dummy/"){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name ascii.jp-skip-summry.html | |
// @description フィードリーダーから飛んだ時に出る、asciiのsummary.htmlを飛ばす | |
// @match http://ascii.jp/* | |
// @run-at document-start | |
// ==/UserScript== | |
var x = /^(http:\/\/ascii\.jp\/elem\/(?:\d+\/)+)summary\.html\?rss$/.exec(location.href); | |
if(x){ | |
location.href = x[1]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name mdcJaEn | |
// @description MDC日本語版の、存在しない文章へのリンクの/ja/を/en/に置き換える。 | |
// @match https://developer.mozilla.org/ja/* | |
// @match https://developer.mozilla.org/Ja/* | |
// ==/UserScript== | |
Array.prototype.forEach.call( | |
document.querySelectorAll("a.new[href^='https://developer.mozilla.org/ja/']"), | |
function(a){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Scroll More | |
// @description マウスホイールのスクロール量を増やす | |
// @match http://*/* | |
// @match https://*/* | |
// ==/UserScript== | |
document.body.addEventListener("mousewheel", function(e){ | |
document.body.scrollTop -= e.wheelDeltaY * 2; | |
}, false); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name noref | |
// @description Aタグにrel="noreferrer"を付ける | |
// @match http://*/* | |
// @match https://*/* | |
// ==/UserScript== | |
var fn = function(node) { | |
if (node.nodeName === 'A') { | |
if (!/(?:^|\s)noreferrer(?:$|\s)/.test(node.rel)) { |