Skip to content

Instantly share code, notes, and snippets.

@niratama
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save niratama/9029695 to your computer and use it in GitHub Desktop.
Save niratama/9029695 to your computer and use it in GitHub Desktop.
futaPoのサムネイルを拡大するuserscript
// ==UserScript==
// @name futaPoサムネイル拡大
// @namespace http://nira.poi.jp/userscript/futapo.user.js
// @version 0.0.3
// @description futaPoのサムネイルを拡大します
// @includes http://futakuro.com/futapo/*
// @excludes
// ==/UserScript==
//
(function (callback) {
var script = document.createElement("script");
script.setAttribute("src", "//code.jquery.com/jquery-1.8.3.min.js");
script.addEventListener('load', function() {
var script = document.createElement("script");
script.textContent = "(" + callback.toString() + ")(jQuery.noConflict(true));";
document.body.appendChild(script);
}, false);
document.body.appendChild(script);
})(function ($) {
$('head').append(
'<style>\n' +
'.box {\n' +
' height: 122px;\n' +
'}\n' +
'.thread-contents {\n' +
' height: 104px;\n' +
'}\n' +
'.thumbnail {\n' +
' width: 102px;\n' +
'}\n' +
'.thumbnailContainer {\n' +
' width: 102px;\n' +
'}\n' +
'.box:visited {\n' +
'border-color: #c0c;\n' +
'}\n' +
'</style>\n'
);
setInterval(function () {
$('img[src*="/cat/"].thumbnail').each(
function (idx, el) {
$(el).attr('src', $(el).attr('src').replace(/cat/,'thumb'));
});
}, 3000);
});
// vi:set sts=2 sw=2 et: