Skip to content

Instantly share code, notes, and snippets.

View javascripter's full-sized avatar

javascripter

View GitHub Profile
// ==UserScript==
// @name All bbeta
// @namespace http://d.hatena.ne.jp/javascripter/
// @include http*
// ==/UserScript==
function replace(parent) {
Array.forEach(
parent.querySelectorAll('a[href^="http://b.hatena.ne.jp/"]'),
function (elem) {
function loadScripts(scripts, allOK) {
var head = document.getElementsByTagName('head').item(0);
var i = 0;
(function load() {
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = scripts[i];
script.addEventListener('load', function () {
(++i == scripts.length) ? AllOK() : load();
}, false);
<?xml version="1.0"?>
<bindings xmlns="http://www.mozilla.org/xbl">
<binding id="behavior">
<implementation><constructor><![CDATA[
this.parentNode.removeChild(this);
]]></constructor></implementation>
</binding>
<!-- var head = document.getElementsByTagName('head').item(0);
head.appendChild(
document.createElement('style'))
// ==UserScript==
// @name FastLDR
// @namespace http://d.hatena.ne.jp/javascripter/
// @include http://fastladder.com/reader/
// ==/UserScript==
var native_post = unsafeWindow.API.prototype.post;
var api_key = null;
GM_xmlhttpRequest({
// ==UserScript==
// @name fc2_img_referer_hack
// @namespace http://d.hatena.ne.jp/javascripter/
// @include http*
// ==/UserScript==
function refhack(parent) {
Array.forEach(
parent.querySelectorAll('a[href^="http://blog-imgs-"]'),
function (a) {
<html>
<head>
<title>ad4u</title>
<style type="text/css">
li {
list-style: none;
}
</style>
<style type="text/css" id="link_style">
li > a:link {
#!/usr/bin/env ruby
# There is a critical bug in this script.Do not use this.
require "pathname"
PATH = "/Users/javascripter/Pictures/adult/"
Dir.chdir(PATH)
Pathname.glob("*").each_with_index {|file, i|
file.rename(i.to_s + file.extname)
}
// ==UserScript==
// @name MarkovLDR
// @namespace http://d.hatena.ne.jp/javascripter/
// @include http://reader.livedoor.com/reader/
// @require http://chasen.org/~taku/software/TinySegmenter/tiny_segmenter-0.1.js
// ==/UserScript==
function Markov() {
this._dic = {};
this._segment = null;
var functools = {
partial: function (fun, thisObject) {
var args = Array.slice(arguments, 2);
return function () {
Array.prototype.unshift.apply(arguments, args);
return fun.apply(thisObject, arguments);
}
},
compose: function () {
var args = arguments;
// ==UserScript==
// @name AllGyotaku
// @namespace http://d.hatena.ne.jp/javascripter/
// @include http*
// ==/UserScript==
var url = location.href;
var form = document.createElement('form');
form.method = 'post';
form.action = 'http://s02.megalodon.jp/' + url;