-
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
24 changed files
with
156 additions
and
136 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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
export default class GundaiWebSite { | ||
HeaderAppendText: string; | ||
EnableRainbow: () => void; | ||
DisableRainbow: () => void; | ||
constructor() { | ||
this.HeaderAppendText = ""; | ||
this.EnableRainbow = () => {}; | ||
this.DisableRainbow = () => {}; | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import { addRainbowBg, addRainbowText } from "../../utils/addClass"; | ||
import changeQueryInnerHTML from "../../utils/changeQueryInnerHTML"; | ||
import GundaiWebSite from "../GundaiWebsite"; | ||
|
||
export default class Kyomu extends GundaiWebSite { | ||
constructor() { | ||
super(); | ||
this.EnableRainbow = () => { | ||
// ログインボタン | ||
// https://qiita.com/Sekky0905/items/a88721f2af41050c93f2 | ||
const loginBtn: HTMLInputElement = <HTMLInputElement>document.getElementById("ctl21_btnLoginShibbolethGunma"); | ||
if (loginBtn) { | ||
loginBtn.value = "群馬大学ゲーミング\nアカウントでログイン"; | ||
} | ||
|
||
// ページ遷移リンク | ||
addRainbowText(".commonTopPageLink", ".commonTopPageLinkWithPadding"); | ||
|
||
addRainbowText( | ||
"#CtlInfLstBfrLginEmrgncy_LblTitle", | ||
"#CtlInfLstBfrLginNrml_LblTitle", | ||
"#AllAnnualList_LblTitle", | ||
"#JeLblSyllabiHeader_lbl", | ||
); | ||
addRainbowBg(".infoListEntryOrgName"); | ||
addRainbowBg(".infoListBeforeLoginGrid"); | ||
|
||
// ログイン後のトップページ | ||
addRainbowBg(".top_title_header", ".top_now_title"); | ||
|
||
// トップページのウェルカムメッセージ | ||
changeQueryInnerHTML(["#loginHeader_lblWelcome_1_lbl"], "よおこそ、群馬大学ゲーミング教務システムへ"); | ||
changeQueryInnerHTML( | ||
["#loginHeader_lblWelcome_2_lbl"], | ||
"このサイトでは、プレーヤーの群馬大学での𝑮𝒂𝒎𝒊𝒏𝒈 𝑳𝒊𝒇𝒆 𝑺𝒕𝒚𝒍𝒆をいい感じにします", | ||
); | ||
|
||
// トップページのお知らせ | ||
changeQueryInnerHTML(["#AllAnnualList_LblTitle"], "ゲーミング ライフ スタイル"); | ||
|
||
// 受信メッセージ一覧 | ||
addRainbowBg("#ctl00_phContents_ctlMesReceive_gridMes tr"); | ||
}; | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import GundaiWebSite from "../GundaiWebsite"; | ||
|
||
export default class MediaCenter extends GundaiWebSite { | ||
constructor() { | ||
super(); | ||
} | ||
} |
4 changes: 2 additions & 2 deletions
4
src/Moodle/DisableRainbow.ts → src/class/Moodle/DisableRainbow.ts
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
4 changes: 2 additions & 2 deletions
4
src/Moodle/EnableRainbow.ts → src/class/Moodle/EnableRainbow.ts
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import GundaiWebSite from "../GundaiWebsite"; | ||
import DisableRainbow from "./DisableRainbow"; | ||
import EnableRainbow from "./EnableRainbow"; | ||
|
||
export const HeaderAppendText = " Gaming Edition🎮"; | ||
|
||
export default class Moodle extends GundaiWebSite { | ||
constructor() { | ||
super(); | ||
this.EnableRainbow = EnableRainbow; | ||
this.DisableRainbow = DisableRainbow; | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import GundaiWebSite from "../GundaiWebsite"; | ||
import EnableRainbow from "./EnableRainbow"; | ||
|
||
export default class SSO extends GundaiWebSite { | ||
constructor() { | ||
super(); | ||
this.EnableRainbow = EnableRainbow; | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import "../styles/gaming.scss"; | ||
import "../styles/kyomu.scss"; | ||
|
||
chrome.runtime.onMessage.addListener((message) => { | ||
if (message === "reload") { | ||
location.reload(); | ||
} | ||
}); |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import Kyomu from "../class/Kyomu"; | ||
import loadGamingWebsite from "../utils/loadGamingWebsite"; | ||
|
||
loadGamingWebsite(new Kyomu()); |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
window.addEventListener("load", () => {}); |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import Moodle from "../class/Moodle"; | ||
import loadGamingWebsite from "../utils/loadGamingWebsite"; | ||
|
||
//window.addEventListener("load", async () => await runFuncIfEnabled(Moodle.EnableRainbow)); | ||
loadGamingWebsite(new Moodle()); | ||
|
||
// あとでリロード無しでゲーミングモード解除を実装する | ||
/* | ||
chrome.action.onClicked.addListener(async () => { | ||
const isEnable = await isEnabled(); | ||
if (isEnable) { | ||
EnableRainbow(); | ||
} else { | ||
DisableRainbow(); | ||
} | ||
}); | ||
*/ |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import SSO from "../class/SSO"; | ||
import loadGamingWebsite from "../utils/loadGamingWebsite"; | ||
|
||
//window.addEventListener("load", async () => await runFuncIfEnabled(SSO.EnableRainbow)); | ||
|
||
loadGamingWebsite(new SSO()); |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import GundaiWebSite from "../class/GundaiWebsite"; | ||
import runFuncIfEnabled from "./runFuncIfEnabled"; | ||
|
||
export default function loadGamingWebsite(website: GundaiWebSite) { | ||
window.addEventListener("load", async () => await runFuncIfEnabled(website.EnableRainbow)); | ||
} |
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