E-Hitomi

Adds a button to E-Hentai to open a supported gallery on Hitomi.la

Versione datata 22/07/2018. Vedi la nuova versione l'ultima versione.

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

You will need to install an extension such as Tampermonkey to install this script.

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

// ==UserScript==
// @name         E-Hitomi
// @namespace    http://goawaynow-gan.tumblr.com/
// @version      1.0
// @description  Adds a button to E-Hentai to open a supported gallery on Hitomi.la
// @author       Goawaynow
// @include      http://exhentai.org/g/*
// @include      http://e-hentai.org/g/*
// @include      http://g.e-hentai.org/g/*
// @include      http://r.e-hentai.org/g/*
// @include      https://exhentai.org/g/*
// @include      https://e-hentai.org/g/*
// @include      https://g.e-hentai.org/g/*
// @include      https://r.e-hentai.org/g/*
// @include      https://hitomi.la/galleries/*
// @require      http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js
// @grant        GM.xmlHttpRequest
// @icon         data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4gQaCi4QRludjAAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAADiUlEQVRo3u2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tmC3caf4nABqoNnFbUBUiyoEIIAJYzzI6Y1noJls431PQXl3H+v0PJ9H66DKDZnLl2p9NrV0qlXjv6DEcx6nxv7/8+htSCET0qUEEEAF0dvwDDzk3GVuBpGoAAAAASUVORK5CYII=
// ==/UserScript==


(function() {
    'use strict';
    var pathsarray = window.location.pathname.split('/');
    var $ = window.jQuery;
    var mricon;
    if ( window.location.hostname == "exhentai.org" ) {
        mricon = "exhentai.org/img";
    } else {
        mricon = "ehgt.org/g";
    }


    GM.xmlHttpRequest({
        method: "GET",
        url: "https://hitomi.la/galleries/"+pathsarray[2]+".html",
        onload: function(response) {
            if ( response.status == 404 | response.status == 403 ) return;
            $("div#gd5").append ($('<p class="g2"><img src="https://'+[mricon]+'/mr.gif"> <a id="hitomilink" href="https://hitomi.la/galleries/'+pathsarray[2]+'.html">Open on Himtomi.la</a></p>'));
        }
    });

})();