NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript==
// @name image slide
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://hitomi.la/reader/*
// @grant none
// @license MIT
// ==/UserScript==
(function () {
$('<button id="turn_page">turn page</button>').insertAfter($('.container .navbar-nav').first())
function toggleSlide() {
if ($('#comicImages').hasClass('slide')) {
$('#comicImages').removeClass('slide')
}
else {
$('#comicImages').addClass('slide')
}
}
setTimeout(function () {
$('#comicImages').addClass('slide');
}, 500)
$(window).on('hashchange', function (e) {
$('#comicImages').addClass('slide')
})
$('#turn_page').click(function (e) {
toggleSlide()
});
$('body').keyup(function (e) {
console.log(e.keyCode)
// enter key
if (e.keyCode == 13 || e.keyCode == 17 || e.keyCode == 18 || e.keyCode == 91) {
toggleSlide()
}
});
})();