diff --git a/cc-inspector/src/scripts/inject-view/app.vue b/cc-inspector/src/scripts/inject-view/app.vue
new file mode 100644
index 0000000..9ed276a
--- /dev/null
+++ b/cc-inspector/src/scripts/inject-view/app.vue
@@ -0,0 +1,210 @@
+
+
+
+
+
+
diff --git a/cc-inspector/src/scripts/inject-view/banner.vue b/cc-inspector/src/scripts/inject-view/banner.vue
new file mode 100644
index 0000000..f28fc8a
--- /dev/null
+++ b/cc-inspector/src/scripts/inject-view/banner.vue
@@ -0,0 +1,92 @@
+
+
+
+
+
+
diff --git a/cc-inspector/src/scripts/inject-view/const.ts b/cc-inspector/src/scripts/inject-view/const.ts
new file mode 100644
index 0000000..bec0b9e
--- /dev/null
+++ b/cc-inspector/src/scripts/inject-view/const.ts
@@ -0,0 +1,5 @@
+import { TinyEmitter } from "tiny-emitter";
+export const Msg = {
+ ChangeAd: "ChangeAd",
+};
+export const emitter = new TinyEmitter();
diff --git a/cc-inspector/src/scripts/inject-view/github.ts b/cc-inspector/src/scripts/inject-view/github.ts
new file mode 100644
index 0000000..9cd0e6e
--- /dev/null
+++ b/cc-inspector/src/scripts/inject-view/github.ts
@@ -0,0 +1,146 @@
+export interface MirrorInfo {
+ /**
+ * 请求的url
+ */
+ name: string;
+ /**
+ * 上次请求成功的时间
+ */
+ time: number;
+}
+class Config {
+ private key = "cc-inspector-ad-config";
+ private data: MirrorInfo[] = [];
+ constructor() {
+ const cfg = localStorage.getItem(this.key);
+ if (cfg) {
+ try {
+ const ret = JSON.parse(cfg) as MirrorInfo[];
+ if (ret) {
+ ret.forEach((el) => {
+ this.data.push({ name: el.name, time: el.time });
+ });
+ }
+ } catch {}
+ }
+ }
+ save(name: string, time: number) {
+ const ret = this.data.find((el) => el.name === name);
+ if (ret) {
+ ret.time = time;
+ } else {
+ this.data.push({ name: name, time: time } as MirrorInfo);
+ }
+ localStorage.setItem(this.key, JSON.stringify(this.data));
+ }
+ getTime(url: string) {
+ const ret = this.data.find((el) => el.name === url);
+ if (ret) {
+ return ret.time;
+ }
+ return 0;
+ }
+}
+export class GithubMirror {
+ owner: string = "tidys";
+ repo: string = "cc-inspector-ad";
+ branch: string = "main";
+ /**
+ * 上次请求成功的时间
+ */
+ time: number = 0;
+ /**
+ * 镜像的名字
+ */
+ name: string = "";
+ private calcUrl: Function;
+ constructor(name: string, cb) {
+ this.name = name;
+ this.time = cfg.getTime(name);
+ this.calcUrl = cb;
+ }
+ private getUrl(file: string) {
+ if (this.calcUrl) {
+ return this.calcUrl(this.owner, this.repo, this.branch, file);
+ } else {
+ return "";
+ }
+ }
+ public async getData(file: string) {
+ const url = this.getUrl(file);
+ if (url) {
+ const data = await this.reqFecth(url);
+ return data;
+ }
+ return null;
+ }
+ private reqFecth(url: string): Promise