Skip to content

NHK Easy Print by userexec

Screenshot of NHK Easy Print

Details

Authoruserexec

LicenseNo License

Categorywww3.nhk.or.jp

Created

Updated

Size1.6 kB

Statistics

Learn how we calculate statistics in the FAQ.

Failed to fetch stats.

Description

Format NHK News Easy articles for printing

Notes

Format NHK News Easy articles for clean printing. Style is only active during print dialogs and does not affect the NHK News Easy site unless printing. Removes UI, images, buttons, etc. Retains text colors.

Source code

/* ==UserStyle==
@name           NHK Easy Print
@namespace      github.com/openstyles/stylus
@version        1.0.0
@description    Print style NHK News Easy articles, only active when printing
@author         Joshua Woehlke
==/UserStyle== */

@-moz-document domain("www3.nhk.or.jp") {
    @media print {
        /* hide page elements */
        header { display: none !important; }
        aside { display: none !important; }
        main > section { display: none !important; }
        div.article-share { display: none !important; }
        div#js-regular-news-wrapper { display: none !important; }
        div.article-top-tool { display: none !important; }
        article a.disaster-banner { display: none !important; }

        /* unwrap padding and margin constraints */
        main, article, #easy-wrapper div {
            margin: 0px !important;
            padding: 0px !important;
            width: auto !important;
            max-width: 100% !important;
        }
        div.l-container {
            display: block !important;
        }

        /* print scaling styles */
        html {
            font-size: 20px;
        }
        article {
            margin: auto !important;
            max-width: 44rem !important;
        }
        p, h1 {
            text-wrap: wrap;
            page-break-inside: avoid;
            word-break: keep-all;
            overflow-wrap: normal;
        }

        /* hide images and video -- comment to allow */
        div.article-figure { display: none; }
        article img { display: none !important; }
    }
}

Reviews

No reviews yet.