Hey everyone,
I made a little script that allows you to browse literotica with your keyboard for when your mouse hand migth be doing other things.
features:
-use left arrow key for previous page
-use right arrow key for next page
-when right is pressed at the end of a chapter it will go to the next one
-when left is pressed at the start of a chapter it will go to the previous chapter.
known issues:
-when no previous or next chapter exist it will redirect you to an empty page
to use this script you need the greasemonkey plugin for firefox:
https://addons.mozilla.org/nl/firefox/addon/greasemonkey/
to install this script, simply follow this link:
https://gist.github.com/anonymous/5...0dfb32ffd36c5335d6/FL0W3r_lit_browser.user.js
sourcecode:
If you decide to use it, save this thread as a bookmark, I might post updates in the future.
I made a little script that allows you to browse literotica with your keyboard for when your mouse hand migth be doing other things.
features:
-use left arrow key for previous page
-use right arrow key for next page
-when right is pressed at the end of a chapter it will go to the next one
-when left is pressed at the start of a chapter it will go to the previous chapter.
known issues:
-when no previous or next chapter exist it will redirect you to an empty page
to use this script you need the greasemonkey plugin for firefox:
https://addons.mozilla.org/nl/firefox/addon/greasemonkey/
to install this script, simply follow this link:
https://gist.github.com/anonymous/5...0dfb32ffd36c5335d6/FL0W3r_lit_browser.user.js
sourcecode:
Code:
// ==UserScript==
// @include https://www.literotica.com/s/*
// @include http://www.literotica.com/s/*
// ==/UserScript==
console.log('xochi\'s lit browser script is loaded.');
var _querry = location.search.substring(location.search.indexOf('=') + 1, location.search.length);
var _chap = location.href.substring(location.href.indexOf('-ch-') + 4, location.href.length - location.search.length);
window.addEventListener('keypress', function (event) {
var _keypressed = event.keyCode
if (_keypressed == 39) {
if (document.getElementById('comments_list') != null) {
if (Number(_chap) < 10) {
window.location.href = location.href.replace('-ch-' + _chap, '-ch-0' + String(Number(_chap) + 1)).substring(0, location.href.length - location.search.length);
}else{
window.location.href = location.href.replace('-ch-' + _chap, '-ch-' + String(Number(_chap) + 1)).substring(0, location.href.length - location.search.length);
}
} else {
if (location.search.substring(location.search.indexOf('?') + 1, location.search.indexOf('?') + 5) == 'page') {
window.location.href = location.search.substring(0, location.search.indexOf('=') + 1) + String(Number(_querry) + 1);
} else {
window.location.href = location.search + '?page=2';
}
}
} else if (_keypressed == 37) {
if (Number(_chap) > 1 && (_querry == 1 || location.search.substring(location.search.indexOf('?') + 1, location.search.indexOf('?') + 5) != 'page')) {
if (Number(_chap) < 10) {
window.location.href = location.href.replace('-ch-' + _chap, '-ch-0' + String(Number(_chap) - 1));
} else {
window.location.href = location.href.replace('-ch-' + _chap, '-ch-' + String(Number(_chap) - 1));
}
} else if (_querry > 1) {
window.location.href = location.search.substring(0, location.search.indexOf('=') + 1) + String(Number(_querry) - 1);
}
}
});
If you decide to use it, save this thread as a bookmark, I might post updates in the future.
Last edited: