Last active
August 29, 2015 13:56
-
-
Save niratama/9029695 to your computer and use it in GitHub Desktop.
futaPoのサムネイルを拡大するuserscript
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 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: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
参考資料