ttk

toggle toolbar

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

// ==UserScript==
// @name         ttk
// @namespace    http://tampermonkey.net/
// @version      0.0.1
// @description  toggle toolbar
// @author       clumsyman
// @copyright 2018, clumsyman (https://openuserjs.org//users/clumsyman)
// @license MIT
// @match        https://ttks.tw/novel/chapters/*/*.html
// @grant        none
// ==/UserScript==

javascript:try {
    function afterLoading() {
        document.head
            .appendChild(document.createElement('style'))
            .append(document.createTextNode(`
                html:not([amp4ads]) {
                    height: 100% !important;
                }
                .txtcenter, .more_recommend {
                    display: none;
                }
                .frame_body.showTools>.breadcrumb_nav, 
                .frame_body.showTools>#color_box, 
                .frame_body.showTools>.page-separator+.content, 
                .frame_body.showTools>.footer_frame {
                    position: sticky;
                }
                .breadcrumb_nav {
                    top: 40px;
                }
                #color_box {
                    top: 80px;
                }
                .page-separator+.content {
                    bottom: 12px;
                }
                .footer_frame {
                    bottom: 0;
                    height: auto;
                }
                .footer_frame > div {
                    line-height: normal;
                }`));
        var frame_body = document.querySelector('.frame_body');
        if (frame_body) {
            frame_body.addEventListener("click", function(event) {
                console.log("frame_body was clicked or tapped!");
                frame_body.classList.toggle('showTools');
            });
        }
    }
    if (document.readyState !== 'loading') {
        afterLoading();
    } else {
        document.addEventListener('DOMContentLoaded', afterLoading);
    }
} catch(e) {
    alert(e + '\n' + e.stack);
}