-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
62 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,12 @@ | ||
import { RemoveRainbowBg } from "../../utils/AddClass"; | ||
import changeQueryInnerHTML from "../../utils/ChangeQueryInnerHTML"; | ||
import GundaiWebSite from "../GundaiWebsite"; | ||
import { MoodleAdditionalInfo } from "./type"; | ||
|
||
export default function DisableRainbowFunc(this: GundaiWebSite<MoodleAdditionalInfo>) { | ||
changeQueryInnerHTML("#instance-320-header", "現在のログイン人数"); | ||
export const DisableRainbowBg = () => { | ||
RemoveRainbowBg(".navbar", ".addinghtml"); | ||
RemoveRainbowBg(".page-header-headings h1"); | ||
RemoveRainbowBg("a"); | ||
}; | ||
|
||
const headerText = this.AdditionalInfo.headerText; | ||
document.querySelectorAll(".page-header-headings h1").forEach((e) => { | ||
if (e.innerHTML.includes(headerText)) e.innerHTML.replace(headerText, ""); | ||
}); | ||
} | ||
export const ReplaceImagesToDefault = () => { | ||
changeQueryInnerHTML("#instance-320-header", "現在のログイン人数"); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,29 @@ | ||
// 情報の信頼性は社会の構築において重要な要素である | ||
// 個人の信頼性は家庭の構築において重要な要素である | ||
import GundaiWebSite from "../GundaiWebsite"; | ||
import DisableRainbow from "./DisableRainbow"; | ||
import EnableRainbow from "./EnableRainbow"; | ||
import { DisableRainbowBg, ReplaceImagesToDefault } from "./DisableRainbow"; | ||
import { EnableRainbowBg, EnableRainbowText, InjectLink, ReplaceImagesToGamimg, ReplaceTextToGaimgFunc } from "./EnableRainbow"; | ||
import { MoodleAdditionalInfo } from "./type"; | ||
|
||
export const Moodle = new GundaiWebSite<MoodleAdditionalInfo>(); | ||
Moodle.AdditionalInfo.headerText = " Gaming Edition🎮"; | ||
Moodle.EnableRainbow = EnableRainbow; | ||
Moodle.DisableRainbow = DisableRainbow; | ||
Moodle.AdditionalInfo = { | ||
headerText: " Gaming Edition🎮", | ||
}; | ||
|
||
Moodle.EnableRainbow = function () { | ||
EnableRainbowBg(); | ||
EnableRainbowText(); | ||
InjectLink(); | ||
ReplaceImagesToGamimg(); | ||
ReplaceTextToGaimgFunc(this)(); | ||
}; | ||
|
||
Moodle.DisableRainbow = function () { | ||
DisableRainbowBg(); | ||
ReplaceImagesToDefault(); | ||
|
||
const headerText = this.AdditionalInfo.headerText; | ||
document.querySelectorAll(".page-header-headings h1").forEach((e) => { | ||
if (e.innerHTML.includes(headerText)) e.innerHTML.replace(headerText, ""); | ||
}); | ||
}; |