MCPcopy Create free account
hub / github.com/hoothin/UserScripts / SideController

Class SideController

Pagetual/pagetual.user.js:7911–8360  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7909 var ruleParser = new RuleParser();
7910
7911 class SideController {
7912 //static controller;
7913 constructor() {
7914 this.inited = false;
7915 }
7916
7917 /*static getInstance() {
7918 if (!SideController.controller) {
7919 SideController.controller = new SideController();
7920 }
7921 return SideController.controller;
7922 }*/
7923
7924 setup() {
7925 if (ruleParser.curSiteRule.sideController === false) return;
7926 if (!rulesData.sideController && !ruleParser.curSiteRule.sideController) return;
7927 this.addToStage();
7928 }
7929
7930 init() {
7931 if (this.inited) return;
7932 this.inited = true;
7933 let self = this;
7934 this.cssText = `
7935 #pagetual-sideController {
7936 position: fixed;
7937 top: calc(50% - 83px);
7938 left: calc(99% - 40px);
7939 width: 40px;
7940 border-radius: 20px;
7941 box-shadow: rgb(0 0 0) 0px 0px 10px;
7942 text-align: center;
7943 background: #ffffffd0!important;
7944 user-select: none;
7945 z-index: 2147483646!important;
7946 padding: 0!important;
7947 opacity: 0.5;
7948 transition: opacity .5s ease, background .5s, box-shadow .5s;
7949 }
7950 #pagetual-sideController.end {
7951 opacity: 0.3;
7952 }
7953 #pagetual-sideController * {
7954 font-weight: bold;
7955 font-family: arial;
7956 font-style: normal;
7957 font-size: 20px!important;
7958 color: black!important;
7959 line-height: normal;
7960 float: none;
7961 text-align: center;
7962 font-feature-settings: normal;
7963 }
7964 #pagetual-sideController.stop {
7965 -webkit-filter: invert(100%);
7966 filter: invert(100%);
7967 }
7968 .pagetual-sideController-btn {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected