Reader-Friendly React Native Docs

Save screen space on React Native Document for better reading experiences, as it should be.

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

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

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==UserScript==
// @name         Reader-Friendly React Native Docs
// @namespace    af-rndoc-cleanify
// @version      0.1
// @description  Save screen space on React Native Document for better reading experiences, as it should be.
// @author       Paranoid_AF
// @match        https://reactnative.dev/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    // Remove announcement.
    document.querySelector(".announcement").style.display = "none";
    document.querySelector(".headerWrapper.wrapper").style.paddingTop = "0";
    document.querySelector(".navPusher").style.paddingTop = "60px";
    document.querySelector(".docsNavContainer").style.top = "0";
    document.querySelector(".docsNavContainer").style.height = "100vh";
    // Add animations to nav bar
    document.querySelector(".fixedHeaderContainer").style.top = "0";
    document.querySelector(".fixedHeaderContainer").style.transition = "top .3s";
    // Hide nav bar when scroll down.
    var lastScroll = 0;
    window.addEventListener("DOMContentLoaded", function(e){
        lastScroll = window.scrollY;
    })
    document.addEventListener("scroll", function(e){
        if(lastScroll < window.scrollY){
           document.querySelector(".fixedHeaderContainer").style.top = "-60px";
        }else{
           document.querySelector(".fixedHeaderContainer").style.top = "0";
        }
        lastScroll = window.scrollY;
    });
})();