Don't mess with my "use subreddit style" toggle (Old Reddit/RES required)

This script always shows RES' "use subreddit style" checkbox in the right of the logout link even if the sub intentionally hides it from the side bar (need RES extension installed)

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

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

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name        Don't mess with my "use subreddit style" toggle (Old Reddit/RES required)
// @author      warireku
// @description This script always shows RES' "use subreddit style" checkbox in the right of the logout link even if the sub intentionally hides it from the side bar (need RES extension installed)
// @include     https://old.reddit.com/r/*
// @license     CC0 1.0 Universal (No Rights Reserved)
// @version     0.1
// @grant       none
// @namespace https://greasyfork.org/users/237709
// ==/UserScript==

//runs when page is fully loaded
window.addEventListener('load', function() {
    var styleBox = document.getElementById("res-style-checkbox");
    //if the res element exists
    if(styleBox !== null){
      styleBox.style.cssText = "display:inline !important; visibility: visible !important";

      var styleForm = document.getElementsByClassName("res-sr-style-toggle");
      var separator = document.getElementsByClassName("separator")[0];
      separator.innerHTML = "|";
      for(var i=0;i<styleForm.length;i++){
        styleForm[i].style.cssText = "display:contents !important; visibility: visible !important; position:absolute !important;";
        document.getElementById("header-bottom-right").appendChild(separator);
        document.getElementById("header-bottom-right").appendChild(styleForm[i]);
      }
		}
}, false);