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

Class NextSwitch

Pagetual/pagetual.user.js:8363–8511  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8361 const sideController = new SideController();
8362
8363 class NextSwitch {
8364 //static nextSwitch;
8365 constructor() {
8366 this.inited = false;
8367 }
8368
8369 /*static getInstance() {
8370 if (!NextSwitch.nextSwitch) {
8371 NextSwitch.nextSwitch = new NextSwitch();
8372 }
8373 return NextSwitch.nextSwitch;
8374 }*/
8375
8376 init() {
8377 if (this.inited) return;
8378 this.inited = true;
8379 let self = this;
8380 this.cssText = `
8381 #pagetual-nextSwitch {
8382 position: fixed;
8383 top: 10px;
8384 left: calc(50% - 160px);
8385 background: aliceblue;
8386 padding: 10px;
8387 border-radius: 5px;
8388 text-align: center;
8389 opacity: 0.95;
8390 color: #161616;
8391 z-index: 2147483647;
8392 font-size: 16px;
8393 box-shadow: rgb(0 0 0) 0px 0px 10px;
8394 }
8395 #pagetual-nextSwitch>.title {
8396 margin: -5px 45px 10px 45px;
8397 font-size: 20px;
8398 font-weight: bold;
8399 border-bottom: 1px solid black;
8400 user-select: none;
8401 color: orangered;
8402 }
8403 #pagetual-nextSwitch>.group {
8404 display: flex;
8405 flex-direction: column;
8406 }
8407 #pagetual-nextSwitch>.group>span {
8408 color: #161616;
8409 cursor: pointer;
8410 margin: 3px;
8411 font-size: larger;
8412 max-width: 200px;
8413 overflow: hidden;
8414 white-space: nowrap;
8415 text-overflow: ellipsis;
8416 }
8417 #pagetual-nextSwitch>.group>span:hover {
8418 color: red;
8419 }
8420 #pagetual-nextSwitch>.group>span.current {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected