e-hentai作品ページ閲覧性向上

----

// ==UserScript==
// @name         e-hentai作品ページ閲覧性向上
// @namespace    e-hentaiWorkPageImprovementOfBrowsability
// @version      0.1
// @description  ----
// @author       You
// @match        https://e-hentai.org/s/*
// @grant        none
/* load jQuery */
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js
// ==/UserScript==

function main(){
    $('script').remove();
    $('body').removeAttr('style');
    $('.sni').removeAttr('ID');
    $('.sni').removeAttr('style');
    $('.sni').css('min-width','0');
    $('iframe').remove();
    $('#i3').removeAttr('ID');
    imageResize();
}
function imageResize(){
    $('img').css('width'      , 'auto');
    $('img').css('height'     , 'auto');
    $('img').css('max-width'  , '100%');
    $('img').css('max-height' , window.innerHeight);
    $('img').removeAttr('onerror');
    $('img').removeAttr('onclick');
    $('img').removeAttr('ID');
    $('body').removeAttr('style');
}
main();

var THRESHOLD = 300;
var _height = Math.max.apply( null, [document.body.clientHeight , document.body.scrollHeight, document.documentElement.scrollHeight, document.documentElement.clientHeight] );
setInterval(function(){
    if (Math.max.apply( null, [document.body.clientHeight , document.body.scrollHeight, document.documentElement.scrollHeight, document.documentElement.clientHeight] ) != _height) {
        imageResize();
    }
    _height = Math.max.apply( null, [document.body.clientHeight , document.body.scrollHeight, document.documentElement.scrollHeight, document.documentElement.clientHeight] );
    //console.log(_height);
}, 300);