// ==UserScript== // @name Comick.cc Next Chapter Keybinding // @namespace http://comick.cc/ // @version 1.0 // @description Binds Comick.cc's next chapter button to CTRL+ALT+` which can be set via other applications to mouse buttons etc // @author Tim Robb // @match http*://*.comick.cc/* // @icon https://www.google.com/s2/favicons?sz=64&domain=comic.cc // @grant none // ==/UserScript== (function () { 'use strict'; document.onkeydown = function (e) { e = e || window.event; if (e.key === '`' && e.ctrlKey === true && e.altKey === true) { // NOTE: The below CSS selector is fragile and may need updating if the HTML changes. // To set it yourself, you'll need to analyze the source of the page and pull out a unique selector for the element. // Most sites actually have a specific class for this link, like `.next-ch-btn`, but Comick.cc sadly doesn't. // If you use this script for another site, make sure to not only check the CSS selector, but the array index too (`[1]`). var href = document.querySelectorAll('.reader-container .items-center a')[1].href; window.location = href; } }; }());