diff --git a/background_birthday/albedo.webp b/background_birthday/albedo.webp new file mode 100644 index 0000000..b8014d5 Binary files /dev/null and b/background_birthday/albedo.webp differ diff --git a/background_birthday/alhaitham.webp b/background_birthday/alhaitham.webp new file mode 100644 index 0000000..1a754b9 Binary files /dev/null and b/background_birthday/alhaitham.webp differ diff --git a/background_birthday/aloy.webp b/background_birthday/aloy.webp new file mode 100644 index 0000000..b0f291d Binary files /dev/null and b/background_birthday/aloy.webp differ diff --git a/background_birthday/amber.webp b/background_birthday/amber.webp new file mode 100644 index 0000000..f17ff53 Binary files /dev/null and b/background_birthday/amber.webp differ diff --git a/background_birthday/ayaka.webp b/background_birthday/ayaka.webp new file mode 100644 index 0000000..a9681fd Binary files /dev/null and b/background_birthday/ayaka.webp differ diff --git a/background_birthday/ayato.webp b/background_birthday/ayato.webp new file mode 100644 index 0000000..7fcdd42 Binary files /dev/null and b/background_birthday/ayato.webp differ diff --git a/background_birthday/baizhu.webp b/background_birthday/baizhu.webp new file mode 100644 index 0000000..426caa4 Binary files /dev/null and b/background_birthday/baizhu.webp differ diff --git a/background_birthday/barbara.webp b/background_birthday/barbara.webp new file mode 100644 index 0000000..639017a Binary files /dev/null and b/background_birthday/barbara.webp differ diff --git a/background_birthday/beidou.webp b/background_birthday/beidou.webp new file mode 100644 index 0000000..2856d45 Binary files /dev/null and b/background_birthday/beidou.webp differ diff --git a/background_birthday/bennett.webp b/background_birthday/bennett.webp new file mode 100644 index 0000000..977eb1c Binary files /dev/null and b/background_birthday/bennett.webp differ diff --git a/background_birthday/candace.webp b/background_birthday/candace.webp new file mode 100644 index 0000000..d8a6dd8 Binary files /dev/null and b/background_birthday/candace.webp differ diff --git a/background_birthday/charlotte.webp b/background_birthday/charlotte.webp new file mode 100644 index 0000000..94c2287 Binary files /dev/null and b/background_birthday/charlotte.webp differ diff --git a/background_birthday/chevreuse.webp b/background_birthday/chevreuse.webp new file mode 100644 index 0000000..1e995cd Binary files /dev/null and b/background_birthday/chevreuse.webp differ diff --git a/background_birthday/childe.webp b/background_birthday/childe.webp new file mode 100644 index 0000000..70bb435 Binary files /dev/null and b/background_birthday/childe.webp differ diff --git a/background_birthday/chongyun.webp b/background_birthday/chongyun.webp new file mode 100644 index 0000000..6458675 Binary files /dev/null and b/background_birthday/chongyun.webp differ diff --git a/background_birthday/collei.webp b/background_birthday/collei.webp new file mode 100644 index 0000000..649ef48 Binary files /dev/null and b/background_birthday/collei.webp differ diff --git a/background_birthday/cyno.webp b/background_birthday/cyno.webp new file mode 100644 index 0000000..e57d4ec Binary files /dev/null and b/background_birthday/cyno.webp differ diff --git a/background_birthday/dehya.webp b/background_birthday/dehya.webp new file mode 100644 index 0000000..8d00987 Binary files /dev/null and b/background_birthday/dehya.webp differ diff --git a/background_birthday/diluc.webp b/background_birthday/diluc.webp new file mode 100644 index 0000000..e7ed57d Binary files /dev/null and b/background_birthday/diluc.webp differ diff --git a/background_birthday/diona.webp b/background_birthday/diona.webp new file mode 100644 index 0000000..30d0e47 Binary files /dev/null and b/background_birthday/diona.webp differ diff --git a/background_birthday/dori.webp b/background_birthday/dori.webp new file mode 100644 index 0000000..04b1181 Binary files /dev/null and b/background_birthday/dori.webp differ diff --git a/background_birthday/element/anemo.png b/background_birthday/element/anemo.png new file mode 100644 index 0000000..cf062d4 Binary files /dev/null and b/background_birthday/element/anemo.png differ diff --git a/background_birthday/element/cryo.png b/background_birthday/element/cryo.png new file mode 100644 index 0000000..5c10474 Binary files /dev/null and b/background_birthday/element/cryo.png differ diff --git a/background_birthday/element/dendro.png b/background_birthday/element/dendro.png new file mode 100644 index 0000000..dc63b8a Binary files /dev/null and b/background_birthday/element/dendro.png differ diff --git a/background_birthday/element/electro.png b/background_birthday/element/electro.png new file mode 100644 index 0000000..a546365 Binary files /dev/null and b/background_birthday/element/electro.png differ diff --git a/background_birthday/element/geo.png b/background_birthday/element/geo.png new file mode 100644 index 0000000..45eb538 Binary files /dev/null and b/background_birthday/element/geo.png differ diff --git a/background_birthday/element/hydro.png b/background_birthday/element/hydro.png new file mode 100644 index 0000000..d600acf Binary files /dev/null and b/background_birthday/element/hydro.png differ diff --git a/background_birthday/element/pyro.png b/background_birthday/element/pyro.png new file mode 100644 index 0000000..004b3a9 Binary files /dev/null and b/background_birthday/element/pyro.png differ diff --git a/background_birthday/eula.webp b/background_birthday/eula.webp new file mode 100644 index 0000000..bfcee15 Binary files /dev/null and b/background_birthday/eula.webp differ diff --git a/background_birthday/faruzan.webp b/background_birthday/faruzan.webp new file mode 100644 index 0000000..94cf755 Binary files /dev/null and b/background_birthday/faruzan.webp differ diff --git a/background_birthday/fischl.webp b/background_birthday/fischl.webp new file mode 100644 index 0000000..3123d13 Binary files /dev/null and b/background_birthday/fischl.webp differ diff --git a/background_birthday/freminet.webp b/background_birthday/freminet.webp new file mode 100644 index 0000000..b8129d5 Binary files /dev/null and b/background_birthday/freminet.webp differ diff --git a/background_birthday/furina.webp b/background_birthday/furina.webp new file mode 100644 index 0000000..99435fa Binary files /dev/null and b/background_birthday/furina.webp differ diff --git a/background_birthday/gaming.webp b/background_birthday/gaming.webp new file mode 100644 index 0000000..28a1026 Binary files /dev/null and b/background_birthday/gaming.webp differ diff --git a/background_birthday/ganyu.webp b/background_birthday/ganyu.webp new file mode 100644 index 0000000..353a7d9 Binary files /dev/null and b/background_birthday/ganyu.webp differ diff --git a/background_birthday/gorou.webp b/background_birthday/gorou.webp new file mode 100644 index 0000000..6b04509 Binary files /dev/null and b/background_birthday/gorou.webp differ diff --git a/background_birthday/heizou.webp b/background_birthday/heizou.webp new file mode 100644 index 0000000..c898344 Binary files /dev/null and b/background_birthday/heizou.webp differ diff --git a/background_birthday/hutao.webp b/background_birthday/hutao.webp new file mode 100644 index 0000000..b8349dd Binary files /dev/null and b/background_birthday/hutao.webp differ diff --git a/background_birthday/itto.webp b/background_birthday/itto.webp new file mode 100644 index 0000000..42fdc54 Binary files /dev/null and b/background_birthday/itto.webp differ diff --git a/background_birthday/jean.webp b/background_birthday/jean.webp new file mode 100644 index 0000000..3ba0a21 Binary files /dev/null and b/background_birthday/jean.webp differ diff --git a/background_birthday/kaeya.webp b/background_birthday/kaeya.webp new file mode 100644 index 0000000..097eae4 Binary files /dev/null and b/background_birthday/kaeya.webp differ diff --git a/background_birthday/kaveh.webp b/background_birthday/kaveh.webp new file mode 100644 index 0000000..03d105a Binary files /dev/null and b/background_birthday/kaveh.webp differ diff --git a/background_birthday/kazuha.webp b/background_birthday/kazuha.webp new file mode 100644 index 0000000..c869f43 Binary files /dev/null and b/background_birthday/kazuha.webp differ diff --git a/background_birthday/keqing.webp b/background_birthday/keqing.webp new file mode 100644 index 0000000..f9e895d Binary files /dev/null and b/background_birthday/keqing.webp differ diff --git a/background_birthday/kirara.webp b/background_birthday/kirara.webp new file mode 100644 index 0000000..9c0d2d4 Binary files /dev/null and b/background_birthday/kirara.webp differ diff --git a/background_birthday/klee.webp b/background_birthday/klee.webp new file mode 100644 index 0000000..25cbc3a Binary files /dev/null and b/background_birthday/klee.webp differ diff --git a/background_birthday/kokomi.webp b/background_birthday/kokomi.webp new file mode 100644 index 0000000..e3b9f96 Binary files /dev/null and b/background_birthday/kokomi.webp differ diff --git a/background_birthday/layla.webp b/background_birthday/layla.webp new file mode 100644 index 0000000..e6def4a Binary files /dev/null and b/background_birthday/layla.webp differ diff --git a/background_birthday/lisa.webp b/background_birthday/lisa.webp new file mode 100644 index 0000000..7a127cd Binary files /dev/null and b/background_birthday/lisa.webp differ diff --git a/background_birthday/lynette.webp b/background_birthday/lynette.webp new file mode 100644 index 0000000..a6f30ae Binary files /dev/null and b/background_birthday/lynette.webp differ diff --git a/background_birthday/lyney.webp b/background_birthday/lyney.webp new file mode 100644 index 0000000..6e1ced4 Binary files /dev/null and b/background_birthday/lyney.webp differ diff --git a/background_birthday/mika.webp b/background_birthday/mika.webp new file mode 100644 index 0000000..5500e98 Binary files /dev/null and b/background_birthday/mika.webp differ diff --git a/background_birthday/mona.webp b/background_birthday/mona.webp new file mode 100644 index 0000000..747a46f Binary files /dev/null and b/background_birthday/mona.webp differ diff --git a/background_birthday/nahida.webp b/background_birthday/nahida.webp new file mode 100644 index 0000000..33da002 Binary files /dev/null and b/background_birthday/nahida.webp differ diff --git a/background_birthday/navia.webp b/background_birthday/navia.webp new file mode 100644 index 0000000..4bff438 Binary files /dev/null and b/background_birthday/navia.webp differ diff --git a/background_birthday/neuvilette.webp b/background_birthday/neuvilette.webp new file mode 100644 index 0000000..d946856 Binary files /dev/null and b/background_birthday/neuvilette.webp differ diff --git a/background_birthday/nilou.webp b/background_birthday/nilou.webp new file mode 100644 index 0000000..6a93cff Binary files /dev/null and b/background_birthday/nilou.webp differ diff --git a/background_birthday/ningguang.webp b/background_birthday/ningguang.webp new file mode 100644 index 0000000..135a361 Binary files /dev/null and b/background_birthday/ningguang.webp differ diff --git a/background_birthday/noelle.webp b/background_birthday/noelle.webp new file mode 100644 index 0000000..bc1980b Binary files /dev/null and b/background_birthday/noelle.webp differ diff --git a/background_birthday/qiqi.webp b/background_birthday/qiqi.webp new file mode 100644 index 0000000..7e0f828 Binary files /dev/null and b/background_birthday/qiqi.webp differ diff --git a/background_birthday/raiden.webp b/background_birthday/raiden.webp new file mode 100644 index 0000000..18b3bda Binary files /dev/null and b/background_birthday/raiden.webp differ diff --git a/background_birthday/razor.webp b/background_birthday/razor.webp new file mode 100644 index 0000000..ce91404 Binary files /dev/null and b/background_birthday/razor.webp differ diff --git a/background_birthday/rosaria.webp b/background_birthday/rosaria.webp new file mode 100644 index 0000000..7d6838c Binary files /dev/null and b/background_birthday/rosaria.webp differ diff --git a/background_birthday/sara.webp b/background_birthday/sara.webp new file mode 100644 index 0000000..f2055f7 Binary files /dev/null and b/background_birthday/sara.webp differ diff --git a/background_birthday/sayu.webp b/background_birthday/sayu.webp new file mode 100644 index 0000000..b3f5a50 Binary files /dev/null and b/background_birthday/sayu.webp differ diff --git a/background_birthday/shenhe.webp b/background_birthday/shenhe.webp new file mode 100644 index 0000000..9ab3633 Binary files /dev/null and b/background_birthday/shenhe.webp differ diff --git a/background_birthday/shinobu.webp b/background_birthday/shinobu.webp new file mode 100644 index 0000000..1b4cb90 Binary files /dev/null and b/background_birthday/shinobu.webp differ diff --git a/background_birthday/sucrose.webp b/background_birthday/sucrose.webp new file mode 100644 index 0000000..1d5be7c Binary files /dev/null and b/background_birthday/sucrose.webp differ diff --git a/background_birthday/thoma.webp b/background_birthday/thoma.webp new file mode 100644 index 0000000..edd8f67 Binary files /dev/null and b/background_birthday/thoma.webp differ diff --git a/background_birthday/tighnari.webp b/background_birthday/tighnari.webp new file mode 100644 index 0000000..90c6bdf Binary files /dev/null and b/background_birthday/tighnari.webp differ diff --git a/background_birthday/venti.webp b/background_birthday/venti.webp new file mode 100644 index 0000000..47881d5 Binary files /dev/null and b/background_birthday/venti.webp differ diff --git a/background_birthday/wanderer.webp b/background_birthday/wanderer.webp new file mode 100644 index 0000000..36d4792 Binary files /dev/null and b/background_birthday/wanderer.webp differ diff --git a/background_birthday/wriothesley.webp b/background_birthday/wriothesley.webp new file mode 100644 index 0000000..c044d49 Binary files /dev/null and b/background_birthday/wriothesley.webp differ diff --git a/background_birthday/xiangling.webp b/background_birthday/xiangling.webp new file mode 100644 index 0000000..e2e3dfd Binary files /dev/null and b/background_birthday/xiangling.webp differ diff --git a/background_birthday/xianyun.webp b/background_birthday/xianyun.webp new file mode 100644 index 0000000..c6f4638 Binary files /dev/null and b/background_birthday/xianyun.webp differ diff --git a/background_birthday/xiao.webp b/background_birthday/xiao.webp new file mode 100644 index 0000000..5b0d723 Binary files /dev/null and b/background_birthday/xiao.webp differ diff --git a/background_birthday/xingqiu.webp b/background_birthday/xingqiu.webp new file mode 100644 index 0000000..bc86594 Binary files /dev/null and b/background_birthday/xingqiu.webp differ diff --git a/background_birthday/xinyan.webp b/background_birthday/xinyan.webp new file mode 100644 index 0000000..61cf73a Binary files /dev/null and b/background_birthday/xinyan.webp differ diff --git a/background_birthday/yaemiko.webp b/background_birthday/yaemiko.webp new file mode 100644 index 0000000..112f91a Binary files /dev/null and b/background_birthday/yaemiko.webp differ diff --git a/background_birthday/yanfei.webp b/background_birthday/yanfei.webp new file mode 100644 index 0000000..0ed27ae Binary files /dev/null and b/background_birthday/yanfei.webp differ diff --git a/background_birthday/yaoyao.webp b/background_birthday/yaoyao.webp new file mode 100644 index 0000000..35f557c Binary files /dev/null and b/background_birthday/yaoyao.webp differ diff --git a/background_birthday/yelan.webp b/background_birthday/yelan.webp new file mode 100644 index 0000000..b0861a6 Binary files /dev/null and b/background_birthday/yelan.webp differ diff --git a/background_birthday/yoimiya.webp b/background_birthday/yoimiya.webp new file mode 100644 index 0000000..183cf74 Binary files /dev/null and b/background_birthday/yoimiya.webp differ diff --git a/background_birthday/yunjin.webp b/background_birthday/yunjin.webp new file mode 100644 index 0000000..de6375a Binary files /dev/null and b/background_birthday/yunjin.webp differ diff --git a/background_birthday/zhongli.webp b/background_birthday/zhongli.webp new file mode 100644 index 0000000..1335243 Binary files /dev/null and b/background_birthday/zhongli.webp differ diff --git a/birthday.json b/birthday.json index 9562047..53eaced 100644 --- a/birthday.json +++ b/birthday.json @@ -1,3 +1,315 @@ { - "03-03": "ToDay" + "01-03": { + "character": "wanderer", + "buttonColor": "17326f", + "element": "anemo" + }, + "01-09": { + "character": "thoma", + "element": "pyro" + }, + "01-10": { + "character": "chevreuse", + "element": "pyro" + }, + "01-18": { + "character": "diona", + "element": "cryo" + }, + "01-22": { + "character": "kirara", + "element": "dendro" + }, + "01-24": { + "character": "rosaria", + "element": "cryo" + }, + "02-02": { + "character": "lyney", + "element": "pyro" + }, + "02-11": { + "character": "alhaitham", + "element": "dendro" + }, + "02-14": { + "character": "beidou", + "element": "electro" + }, + "02-22": { + "character": "kokomi", + "element": "hydro" + }, + "02-29": { + "character": "bennett", + "buttonColor": "#b36952", + "element": "pyro" + }, + "03-03": { + "character": "qiqi", + "element": "cryo" + }, + "03-06": { + "character": "yaoyao", + "element": "dendro" + }, + "03-10": { + "character": "shenhe", + "element": "cryo" + }, + "03-14": { + "character": "jean", + "element": "anemo" + }, + "03-21": { + "character": "noelle", + "element": "geo" + }, + "03-26": { + "character": "ayato", + "element": "hydro" + }, + "04-04": { + "character": "aloy", + "element": "cryo" + }, + "04-07": { + "character": "dehya", + "element": "pyro" + }, + "04-10": { + "character": "charlotte", + "element": "cryo" + }, + "04-11": { + "character": "xianyun", + "element": "anemo" + }, + "04-17": { + "character": "xiao", + "element": "anemo" + }, + "04-20": { + "character": "yelan", + "element": "hydro" + }, + "04-25": { + "character": "baizhu", + "element": "dendro" + }, + "04-30": { + "character": "diluc", + "element": "pyro" + }, + "05-03": { + "character": "candace", + "element": "hydro" + }, + "05-08": { + "character": "collei", + "element": "dendro" + }, + "05-18": { + "character": "gorou", + "element": "geo" + }, + "05-21": { + "character": "yunjin", + "element": "geo" + }, + "06-01": { + "character": "itto", + "element": "geo" + }, + "06-09": { + "character": "lisa", + "element": "electro" + }, + "06-16": { + "character": "venti", + "buttonColor": "#147a7e", + "element": "anemo" + }, + "06-21": { + "character": "yoimiya" + }, + "06-23": { + "character": "cyno", + "element": "electro" + }, + "06-26": { + "character": "raiden", + "buttonColor": "#565783", + "element": "electro" + }, + "06-27": { + "character": "yaemiko", + "element": "electro" + }, + "07-05": { + "character": "barbara", + "element": "hydro" + }, + "07-09": { + "character": "kaveh", + "element": "dendro" + }, + "07-14": { + "character": "sara", + "element": "electro" + }, + "07-15": { + "character": "hutao", + "element": "pyro" + }, + "07-20": { + "character": "tartaglia", + "element": "hydro" + }, + "07-24": { + "character": "heizou", + "element": "anemo" + }, + "07-27": { + "character": "klee", + "element": "pyro" + }, + "07-28": { + "character": "yanfei", + "element": "pyro" + }, + "08-10": { + "character": "amber", + "element": "pyro" + }, + "08-11": { + "character": "mika", + "element": "cryo" + }, + "08-16": { + "character": "navia", + "element": "geo" + }, + "08-17": { + "character": "chiori", + "element": "geo" + }, + "08-20": { + "character": "faruzan", + "element": "anemo" + }, + "08-26": { + "character": "ningguang", + "element": "geo" + }, + "08-31": { + "character": "mona", + "buttonColor": "#493f80", + "element": "hydro" + }, + "09-07": { + "character": "chongyun", + "element": "cryo" + }, + "09-09": { + "character": "razor", + "element": "electro" + }, + "09-13": { + "character": "albedo", + "element": "geo" + }, + "09-24": { + "character": "freminet", + "element": "cryo" + }, + "09-28": { + "character": "ayaka", + "element": "cryo" + }, + "10-09": { + "character": "xingqiu", + "element": "hydro" + }, + "10-13": { + "character": "furina", + "buttonColor": "#17277b", + "element": "hydro" + }, + "10-16": { + "character": "xinyan", + "element": "pyro" + }, + "10-19": { + "character": "sayu", + "element": "anemo" + }, + "10-25": { + "character": "eula", + "buttonColor": "#2b303c", + "element": "cryo" + }, + "10-27": { + "character": "nahida", + "buttonColor": "#bad5b5", + "element": "dendro" + }, + "10-29": { + "character": "kazuha", + "buttonColor": "#618579", + "element": "anemo" + }, + "11-02": { + "character": "xiangling", + "element": "pyro" + }, + "11-20": { + "character": "keqing", + "element": "electro" + }, + "11-23": { + "character": "wriothesley", + "element": "cryo" + }, + "11-26": { + "character": "sucrose", + "element": "anemo" + }, + "11-30": { + "character": "kaeya", + "element": "cryo" + }, + "12-02": { + "character": "ganyu", + "buttonColor": "#5084d4", + "element": "cryo" + }, + "12-03": { + "character": "nilou" + }, + "12-18": { + "character": "neuvillette", + "element": "hydro" + }, + "12-19": { + "character": "layla", + "element": "hydro" + }, + "12-21": { + "character": "dori", + "element": "electro" + }, + "12-22": { + "character": "gaming", + "element": "pyro" + }, + "12-29": { + "character": "tighnari", + "element": "dendro" + }, + "12-31": { + "character": "zhongli", + "buttonColor": "#635047", + "element": "geo" + } } \ No newline at end of file diff --git a/chromium/_locales/en/messages.json b/chromium/_locales/en/messages.json index 7ab1e64..0bd5dde 100644 --- a/chromium/_locales/en/messages.json +++ b/chromium/_locales/en/messages.json @@ -1,6 +1,6 @@ { "extensionDescription": { - "message": "Quick entry of Genshin Impact/Honkai: Star Rail promo codes | 2.2.4.7" + "message": "Quick entry of Genshin Impact/Honkai: Star Rail promo codes | 2.2.5" }, "sthsr": { "message": "Submit" @@ -59,12 +59,6 @@ "labelMainPopup": { "message": "Main popup settings" }, - "labelOnlyGi": { - "message": "Popup settings, only Genshin Impact" - }, - "labelOnlyHsr": { - "message": "Popup settings, Honkai Star Rail only" - }, "labelRounding": { "message": "Disable roundings" }, @@ -73,5 +67,14 @@ }, "labelFont": { "message": "Font" + }, + "labelOnlyGi": { + "message": "Genshin Impact Mode" + }, + "labelOnlyHsr": { + "message": "Honkai Star Rail Mode" + }, + "labelBirthday": { + "message": "Disable character birthday customization" } } \ No newline at end of file diff --git a/chromium/_locales/es/messages.json b/chromium/_locales/es/messages.json index 502eadb..b05a596 100644 --- a/chromium/_locales/es/messages.json +++ b/chromium/_locales/es/messages.json @@ -1,6 +1,6 @@ { "extensionDescription": { - "message": "Entrada rápida de los códigos promocionales de Genshin Impact/Honkai: Star Rail | 2.2.4.7" + "message": "Entrada rápida de los códigos promocionales de Genshin Impact/Honkai: Star Rail | 2.2.5" }, "sthsr": { "message": "Enviar" @@ -59,12 +59,6 @@ "labelMainPopup": { "message": "Configuración de la ventana principal" }, - "labelOnlyGi": { - "message": "Ajustes de ventana, sólo Genshin Impact" - }, - "labelOnlyHsr": { - "message": "Ajustes de ventana, sólo Honkai Star Rail" - }, "labelRounding": { "message": "Desactivar el redondeo" }, @@ -73,5 +67,14 @@ }, "labelFont": { "message": "Fuente" + }, + "labelOnlyGi": { + "message": "Modo Genshin Impact" + }, + "labelOnlyHsr": { + "message": "Modo Honkai Star Rail" + }, + "labelBirthday": { + "message": "Desactivar la personalización del cumpleaños del personaje" } } \ No newline at end of file diff --git a/chromium/_locales/jp/messages.json b/chromium/_locales/jp/messages.json index cac10fd..a820689 100644 --- a/chromium/_locales/jp/messages.json +++ b/chromium/_locales/jp/messages.json @@ -56,12 +56,6 @@ "labelMainPopup": { "message": "メインウィンドウの設定" }, - "labelOnlyGi": { - "message": "ウィンドウの設定のみ Genshin Impact" - }, - "labelOnlyHsr": { - "message": "ウィンドウの設定のみ Honkai Star Rail" - }, "labelRounding": { "message": "丸めを無効にする" }, @@ -70,5 +64,14 @@ }, "labelFont": { "message": "フォント" + }, + "labelOnlyGi": { + "message": "Genshin Impactモード" + }, + "labelOnlyHsr": { + "message": "Honkai Star Railモード" + }, + "labelBirthday": { + "message": "キャラクターの誕生日のカスタマイズを無効にする" } } \ No newline at end of file diff --git a/chromium/_locales/ru/messages.json b/chromium/_locales/ru/messages.json index d6f217b..e5c86a7 100644 --- a/chromium/_locales/ru/messages.json +++ b/chromium/_locales/ru/messages.json @@ -1,6 +1,6 @@ { "extensionDescription": { - "message": "Быстрый ввод промокодов Genshin Impact/Honkai: Star Rail | 2.2.4.7" + "message": "Быстрый ввод промокодов Genshin Impact/Honkai: Star Rail | 2.2.5" }, "sthsr": { "message": "Ввести" @@ -59,12 +59,6 @@ "labelMainPopup": { "message": "Настройки основного окна" }, - "labelOnlyGi": { - "message": "Настройки окна, только Genshin Impact" - }, - "labelOnlyHsr": { - "message": "Настройки окна, только Honkai Star Rail" - }, "labelRounding": { "message": "Отключить закругления" }, @@ -73,5 +67,14 @@ }, "labelFont": { "message": "Шрифт" + }, + "labelOnlyGi": { + "message": "Режим Genshin Impact" + }, + "labelOnlyHsr": { + "message": "Режим Honkai Star Rail" + }, + "labelBirthday": { + "message": "Отключить кастомизацию ко дню рождения персонажа" } } \ No newline at end of file diff --git a/chromium/options.css b/chromium/options.css index a7b220e..d217f08 100644 --- a/chromium/options.css +++ b/chromium/options.css @@ -51,7 +51,7 @@ button:hover { } @media (prefers-color-scheme: dark) { body { - background-color: #292a2d; + background-color: #3b3b3b; color: white; } } @@ -85,7 +85,6 @@ toggle-switch-container { left: 0; right: 0; bottom: 0; - background-color: #292a2d; } .slider:before { position: absolute; diff --git a/chromium/options.html b/chromium/options.html index 2093fc7..76ce4fe 100644 --- a/chromium/options.html +++ b/chromium/options.html @@ -13,14 +13,14 @@
-
- - -
+
+ + +
@@ -31,6 +31,10 @@
+
+ + +
@@ -39,16 +43,20 @@
-
+

Font:

+
+ + +
diff --git a/chromium/options.js b/chromium/options.js index 14e7a59..01cae51 100644 --- a/chromium/options.js +++ b/chromium/options.js @@ -23,7 +23,9 @@ const labels = { 'labelMainPopup-settings': 'labelMainPopup', 'labelOnlyGi-settings': 'labelOnlyGi', 'labelOnlyHsr-settings': 'labelOnlyHsr', - 'labelFont': 'labelFont' + 'labelFont': 'labelFont', + 'labelMainBirthday': 'labelBirthday', + 'labelGIBirthday': 'labelBirthday' }; for (let id in labels) { document.getElementById(id).textContent = browser.i18n.getMessage(labels[id]); @@ -95,6 +97,18 @@ document.getElementById('iconDisable').addEventListener('change', function() { iconDisable: iconDisable }); }); +document.getElementById('mainBirthdayDisable').addEventListener('change', function() { + var mainBirthdayDisable = document.getElementById('mainBirthdayDisable').checked; + browser.storage.local.set({ + mainBirthdayDisable: mainBirthdayDisable + }); +}); +document.getElementById('giBirthdayDisable').addEventListener('change', function() { + var giBirthdayDisable = document.getElementById('giBirthdayDisable').checked; + browser.storage.local.set({ + giBirthdayDisable: giBirthdayDisable + }); +}); document.getElementById('roundingDisable').addEventListener('change', function() { var roundingDisable = document.getElementById('roundingDisable').checked; browser.storage.local.set({ @@ -153,7 +167,7 @@ browser.storage.local.get(['roundingDisable']).then(function (result) { document.documentElement.style.setProperty('--border-radius', '20px') } }); -browser.storage.local.get(['mainFont', 'iconDisable', 'roundingDisable', 'BackgroundHsr', 'BackgroundColorHsr', 'BackgroundGi', 'BackgroundColorGi', 'buttonColorMain', 'buttonColorGi', 'buttonColorHsr', 'buttonTextColorMain', 'buttonTextColorGi', 'buttonTextColorHsr', 'onlyHsr', 'onlyGi'], function(result) { +browser.storage.local.get(['giBirthdayDisable', 'mainBirthdayDisable', 'mainFont', 'iconDisable', 'roundingDisable', 'BackgroundHsr', 'BackgroundColorHsr', 'BackgroundGi', 'BackgroundColorGi', 'buttonColorMain', 'buttonColorGi', 'buttonColorHsr', 'buttonTextColorMain', 'buttonTextColorGi', 'buttonTextColorHsr', 'onlyHsr', 'onlyGi'], function(result) { const defaults = { 'buttonColorMain': '#9a609a', 'buttonColorGi': '#a89f96', @@ -166,6 +180,8 @@ browser.storage.local.get(['mainFont', 'iconDisable', 'roundingDisable', 'Backgr 'onlyHsr': false, 'onlyGi': false, 'iconDisable': false, + 'mainBirthdayDisable': false, + 'giBirthdayDisable': false, 'roundingDisable': false, 'BackgroundGi': false, 'BackgroundHsr': false, @@ -210,6 +226,8 @@ browser.storage.local.get(['mainFont', 'iconDisable', 'roundingDisable', 'Backgr 'onlyHsr': onlyHsr, 'onlyGi': onlyGi, 'iconDisable': iconDisable, + 'mainBirthdayDisable': mainBirthdayDisable, + 'giBirthdayDisable': giBirthdayDisable, 'roundingDisable': roundingDisable, 'BackgroundHsr': BackgroundHsr, 'BackgroundGi': BackgroundGi, diff --git a/chromium/popup.html b/chromium/popup.html index a962c2c..86b8cbe 100644 --- a/chromium/popup.html +++ b/chromium/popup.html @@ -12,11 +12,11 @@ body { font-family: var(--); padding: 10px; + background-image: url(./pictures/background.png); background-size: cover; background-repeat: no-repeat; background-position: center; overflow: hidden; - background-image: url(./pictures/background.png); max-height: 560px; min-width: 300px; } diff --git a/chromium/popup.js b/chromium/popup.js index 11281a0..99cd0b2 100644 --- a/chromium/popup.js +++ b/chromium/popup.js @@ -128,6 +128,59 @@ browser.storage.local.get(['onlyHsr', 'onlyGi']).then(function (result) { document.body.style.overflow = 'hidden'; } }); + browser.storage.local.get(['giBirthdayDisable']).then((result) => { + if (!result.giBirthdayDisable) { + let today = new Date(); + let dd = String(today.getDate()).padStart(2, '0'); + let mm = String(today.getMonth() + 1).padStart(2, '0'); + today = mm + '-' + dd; + fetch('https://raw.githubusercontent.com/Kajitsy/Genshin-Star-Rail-CodeEntter/main/birthday.json') + .then(response => response.json()) + .then(birthdayData => { + if (birthdayData[today]) { + let characterData = birthdayData[today]; + let bgUrl = 'https://raw.githubusercontent.com/Kajitsy/Genshin-Star-Rail-CodeEntter/main/background_birthday/' + characterData.character + '.webp'; + function createEffect() { + const effect = document.createElement('div'); + effect.className = 'effect'; + let effectUrl = 'https://raw.githubusercontent.com/Kajitsy/Genshin-Star-Rail-CodeEntter/main/background_birthday/element/' + characterData.element + '.png'; + effect.innerHTML = ''; + effect.style.position = 'absolute'; + effect.style.pointerEvents = 'none'; + const startPositionLeft = Math.random() * window.innerWidth; + const duration = Math.random() * 4 + 3 + 's'; + const delay = Math.random() * 10 + 's'; + effect.style.left = startPositionLeft + 'px'; + effect.style.animation = `snowfall ${duration} linear ${delay} infinite`; + document.body.appendChild(effect); + effect.addEventListener('animationiteration', () => { + effect.style.left = Math.random() * window.innerWidth + 'px'; + }); + } + function generateEffect() { + for (let i = 0; i < 5; i++) { + createEffect(); + } + } + if (characterData.element) { + generateEffect() + } + document.body.style.background = 'url(' + bgUrl + ')'; + document.body.style.backgroundSize = 'cover'; + document.body.style.backgroundRepeat = 'no-repeat'; + document.body.style.backgroundPosition = 'center'; + document.body.style.overflow = 'hidden'; + if (characterData.buttonColor) { + document.documentElement.style.setProperty('--button-color', characterData.buttonColor); + } else if (characterData.buttonColor && characterData.buttonTextColor) { + document.documentElement.style.setProperty('--button-color', characterData.buttonColor); + document.documentElement.style.setProperty('--button-text-color', characterData.buttonTextColor); + } + } + }) + .catch(err => console.error(err)); + } + }); } else { font.insertRule(mainFont, font.cssRules.length); buttonIds.forEach((buttonId) => { @@ -178,9 +231,62 @@ browser.storage.local.get(['onlyHsr', 'onlyGi']).then(function (result) { if (result.buttonTextColorMain) { document.documentElement.style.setProperty('--button-text-color', result.buttonTextColorMain); } - }); + }); + browser.storage.local.get(['mainBirthdayDisable']).then((result) => { + if (!result.mainBirthdayDisable) { + let today = new Date(); + let dd = String(today.getDate()).padStart(2, '0'); + let mm = String(today.getMonth() + 1).padStart(2, '0'); + today = mm + '-' + dd; + fetch('https://raw.githubusercontent.com/Kajitsy/Genshin-Star-Rail-CodeEntter/main/birthday.json') + .then(response => response.json()) + .then(birthdayData => { + if (birthdayData[today]) { + let characterData = birthdayData[today]; + let bgUrl = 'https://raw.githubusercontent.com/Kajitsy/Genshin-Star-Rail-CodeEntter/main/background_birthday/' + characterData.character + '.webp'; + function createEffect() { + const effect = document.createElement('div'); + effect.className = 'effect'; + let effectUrl = 'https://raw.githubusercontent.com/Kajitsy/Genshin-Star-Rail-CodeEntter/main/background_birthday/element/' + characterData.element + '.png'; + effect.innerHTML = ''; + effect.style.position = 'absolute'; + effect.style.pointerEvents = 'none'; + const startPositionLeft = Math.random() * window.innerWidth; + const duration = Math.random() * 4 + 3 + 's'; + const delay = Math.random() * 10 + 's'; + effect.style.left = startPositionLeft + 'px'; + effect.style.animation = `snowfall ${duration} linear ${delay} infinite`; + document.body.appendChild(effect); + effect.addEventListener('animationiteration', () => { + effect.style.left = Math.random() * window.innerWidth + 'px'; + }); + } + function generateEffect() { + for (let i = 0; i < 10; i++) { + createEffect(); + } + } + if (characterData.element) { + generateEffect() + } + document.body.style.background = 'url(' + bgUrl + ')'; + document.body.style.backgroundSize = 'cover'; + document.body.style.backgroundRepeat = 'no-repeat'; + document.body.style.backgroundPosition = 'center'; + document.body.style.overflow = 'hidden'; + if (characterData.buttonColor) { + document.documentElement.style.setProperty('--button-color', characterData.buttonColor); + } else if (characterData.buttonColor && characterData.buttonTextColor) { + document.documentElement.style.setProperty('--button-color', characterData.buttonColor); + document.documentElement.style.setProperty('--button-text-color', characterData.buttonTextColor); + } + } + }) + .catch(err => console.error(err)); + } + }); } }) browser.storage.local.get(['roundingDisable']).then((result) => { document.documentElement.style.setProperty('--border-radius', result.roundingDisable ? '10px' : '20px'); -}); +}); \ No newline at end of file diff --git a/firefox/_locales/en/messages.json b/firefox/_locales/en/messages.json index 7ab1e64..0bd5dde 100644 --- a/firefox/_locales/en/messages.json +++ b/firefox/_locales/en/messages.json @@ -1,6 +1,6 @@ { "extensionDescription": { - "message": "Quick entry of Genshin Impact/Honkai: Star Rail promo codes | 2.2.4.7" + "message": "Quick entry of Genshin Impact/Honkai: Star Rail promo codes | 2.2.5" }, "sthsr": { "message": "Submit" @@ -59,12 +59,6 @@ "labelMainPopup": { "message": "Main popup settings" }, - "labelOnlyGi": { - "message": "Popup settings, only Genshin Impact" - }, - "labelOnlyHsr": { - "message": "Popup settings, Honkai Star Rail only" - }, "labelRounding": { "message": "Disable roundings" }, @@ -73,5 +67,14 @@ }, "labelFont": { "message": "Font" + }, + "labelOnlyGi": { + "message": "Genshin Impact Mode" + }, + "labelOnlyHsr": { + "message": "Honkai Star Rail Mode" + }, + "labelBirthday": { + "message": "Disable character birthday customization" } } \ No newline at end of file diff --git a/firefox/_locales/es/messages.json b/firefox/_locales/es/messages.json index 502eadb..b05a596 100644 --- a/firefox/_locales/es/messages.json +++ b/firefox/_locales/es/messages.json @@ -1,6 +1,6 @@ { "extensionDescription": { - "message": "Entrada rápida de los códigos promocionales de Genshin Impact/Honkai: Star Rail | 2.2.4.7" + "message": "Entrada rápida de los códigos promocionales de Genshin Impact/Honkai: Star Rail | 2.2.5" }, "sthsr": { "message": "Enviar" @@ -59,12 +59,6 @@ "labelMainPopup": { "message": "Configuración de la ventana principal" }, - "labelOnlyGi": { - "message": "Ajustes de ventana, sólo Genshin Impact" - }, - "labelOnlyHsr": { - "message": "Ajustes de ventana, sólo Honkai Star Rail" - }, "labelRounding": { "message": "Desactivar el redondeo" }, @@ -73,5 +67,14 @@ }, "labelFont": { "message": "Fuente" + }, + "labelOnlyGi": { + "message": "Modo Genshin Impact" + }, + "labelOnlyHsr": { + "message": "Modo Honkai Star Rail" + }, + "labelBirthday": { + "message": "Desactivar la personalización del cumpleaños del personaje" } } \ No newline at end of file diff --git a/firefox/_locales/jp/messages.json b/firefox/_locales/jp/messages.json index cac10fd..a820689 100644 --- a/firefox/_locales/jp/messages.json +++ b/firefox/_locales/jp/messages.json @@ -56,12 +56,6 @@ "labelMainPopup": { "message": "メインウィンドウの設定" }, - "labelOnlyGi": { - "message": "ウィンドウの設定のみ Genshin Impact" - }, - "labelOnlyHsr": { - "message": "ウィンドウの設定のみ Honkai Star Rail" - }, "labelRounding": { "message": "丸めを無効にする" }, @@ -70,5 +64,14 @@ }, "labelFont": { "message": "フォント" + }, + "labelOnlyGi": { + "message": "Genshin Impactモード" + }, + "labelOnlyHsr": { + "message": "Honkai Star Railモード" + }, + "labelBirthday": { + "message": "キャラクターの誕生日のカスタマイズを無効にする" } } \ No newline at end of file diff --git a/firefox/_locales/ru/messages.json b/firefox/_locales/ru/messages.json index d6f217b..e5c86a7 100644 --- a/firefox/_locales/ru/messages.json +++ b/firefox/_locales/ru/messages.json @@ -1,6 +1,6 @@ { "extensionDescription": { - "message": "Быстрый ввод промокодов Genshin Impact/Honkai: Star Rail | 2.2.4.7" + "message": "Быстрый ввод промокодов Genshin Impact/Honkai: Star Rail | 2.2.5" }, "sthsr": { "message": "Ввести" @@ -59,12 +59,6 @@ "labelMainPopup": { "message": "Настройки основного окна" }, - "labelOnlyGi": { - "message": "Настройки окна, только Genshin Impact" - }, - "labelOnlyHsr": { - "message": "Настройки окна, только Honkai Star Rail" - }, "labelRounding": { "message": "Отключить закругления" }, @@ -73,5 +67,14 @@ }, "labelFont": { "message": "Шрифт" + }, + "labelOnlyGi": { + "message": "Режим Genshin Impact" + }, + "labelOnlyHsr": { + "message": "Режим Honkai Star Rail" + }, + "labelBirthday": { + "message": "Отключить кастомизацию ко дню рождения персонажа" } } \ No newline at end of file diff --git a/firefox/manifest.json b/firefox/manifest.json index 73fb539..7e8ab5e 100644 --- a/firefox/manifest.json +++ b/firefox/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 2, "name": "Genshin/Star Rail CodeEntter", - "version": "2.2.4.7", + "version": "2.2.5", "description": "__MSG_extensionDescription__", "default_locale": "en", "icons": { diff --git a/firefox/options.css b/firefox/options.css index 31777ce..bf9018e 100644 --- a/firefox/options.css +++ b/firefox/options.css @@ -51,7 +51,7 @@ button:hover { } @media (prefers-color-scheme: dark) { body { - background-color: rgb(35, 34, 43); + background-color: #23222b; color: white; } } @@ -85,7 +85,6 @@ toggle-switch-container { left: 0; right: 0; bottom: 0; - background-color: #23222b; } .slider:before { position: absolute; diff --git a/firefox/options.html b/firefox/options.html index 6dfed8b..64a52f7 100644 --- a/firefox/options.html +++ b/firefox/options.html @@ -13,14 +13,14 @@
-
- - -
+
+ + +
@@ -31,6 +31,10 @@
+
+ + +
@@ -49,6 +53,10 @@
+
+ + +
diff --git a/firefox/options.js b/firefox/options.js index 3fd6a24..5f13ed1 100644 --- a/firefox/options.js +++ b/firefox/options.js @@ -20,7 +20,9 @@ const labels = { 'labelMainPopup-settings': 'labelMainPopup', 'labelOnlyGi-settings': 'labelOnlyGi', 'labelOnlyHsr-settings': 'labelOnlyHsr', - 'labelFont': 'labelFont' + 'labelFont': 'labelFont', + 'labelMainBirthday': 'labelBirthday', + 'labelGIBirthday': 'labelBirthday' }; for (let id in labels) { document.getElementById(id).textContent = browser.i18n.getMessage(labels[id]); @@ -92,6 +94,18 @@ document.getElementById('iconDisable').addEventListener('change', function() { iconDisable: iconDisable }); }); +document.getElementById('mainBirthdayDisable').addEventListener('change', function() { + var mainBirthdayDisable = document.getElementById('mainBirthdayDisable').checked; + browser.storage.local.set({ + mainBirthdayDisable: mainBirthdayDisable + }); +}); +document.getElementById('giBirthdayDisable').addEventListener('change', function() { + var giBirthdayDisable = document.getElementById('giBirthdayDisable').checked; + browser.storage.local.set({ + giBirthdayDisable: giBirthdayDisable + }); +}); document.getElementById('roundingDisable').addEventListener('change', function() { var roundingDisable = document.getElementById('roundingDisable').checked; browser.storage.local.set({ @@ -150,7 +164,7 @@ browser.storage.local.get(['roundingDisable']).then(function (result) { document.documentElement.style.setProperty('--border-radius', '20px') } }); -browser.storage.local.get(['mainFont', 'iconDisable', 'roundingDisable', 'BackgroundHsr', 'BackgroundColorHsr', 'BackgroundGi', 'BackgroundColorGi', 'buttonColorMain', 'buttonColorGi', 'buttonColorHsr', 'buttonTextColorMain', 'buttonTextColorGi', 'buttonTextColorHsr', 'onlyHsr', 'onlyGi'], function(result) { +browser.storage.local.get(['giBirthdayDisable', 'mainBirthdayDisable', 'mainFont', 'iconDisable', 'roundingDisable', 'BackgroundHsr', 'BackgroundColorHsr', 'BackgroundGi', 'BackgroundColorGi', 'buttonColorMain', 'buttonColorGi', 'buttonColorHsr', 'buttonTextColorMain', 'buttonTextColorGi', 'buttonTextColorHsr', 'onlyHsr', 'onlyGi'], function(result) { const defaults = { 'buttonColorMain': '#9a609a', 'buttonColorGi': '#a89f96', @@ -163,6 +177,8 @@ browser.storage.local.get(['mainFont', 'iconDisable', 'roundingDisable', 'Backgr 'onlyHsr': false, 'onlyGi': false, 'iconDisable': false, + 'mainBirthdayDisable': false, + 'giBirthdayDisable': false, 'roundingDisable': false, 'BackgroundGi': false, 'BackgroundHsr': false, @@ -207,6 +223,8 @@ browser.storage.local.get(['mainFont', 'iconDisable', 'roundingDisable', 'Backgr 'onlyHsr': onlyHsr, 'onlyGi': onlyGi, 'iconDisable': iconDisable, + 'mainBirthdayDisable': mainBirthdayDisable, + 'giBirthdayDisable': giBirthdayDisable, 'roundingDisable': roundingDisable, 'BackgroundHsr': BackgroundHsr, 'BackgroundGi': BackgroundGi, diff --git a/firefox/popup.html b/firefox/popup.html index a962c2c..8a18501 100644 --- a/firefox/popup.html +++ b/firefox/popup.html @@ -12,11 +12,11 @@ body { font-family: var(--); padding: 10px; + background: url("/pictures/background.png"); background-size: cover; background-repeat: no-repeat; background-position: center; overflow: hidden; - background-image: url(./pictures/background.png); max-height: 560px; min-width: 300px; } diff --git a/firefox/popup.js b/firefox/popup.js index 8162073..51ba0db 100644 --- a/firefox/popup.js +++ b/firefox/popup.js @@ -125,6 +125,59 @@ browser.storage.local.get(['onlyHsr', 'onlyGi']).then(function (result) { document.body.style.overflow = 'hidden'; } }); + browser.storage.local.get(['giBirthdayDisable']).then((result) => { + if (!result.giBirthdayDisable) { + let today = new Date(); + let dd = String(today.getDate()).padStart(2, '0'); + let mm = String(today.getMonth() + 1).padStart(2, '0'); + today = mm + '-' + dd; + fetch('https://raw.githubusercontent.com/Kajitsy/Genshin-Star-Rail-CodeEntter/main/birthday.json') + .then(response => response.json()) + .then(birthdayData => { + if (birthdayData[today]) { + let characterData = birthdayData[today]; + let bgUrl = 'https://raw.githubusercontent.com/Kajitsy/Genshin-Star-Rail-CodeEntter/main/background_birthday/' + characterData.character + '.webp'; + function createEffect() { + const effect = document.createElement('div'); + effect.className = 'effect'; + let effectUrl = 'https://raw.githubusercontent.com/Kajitsy/Genshin-Star-Rail-CodeEntter/main/background_birthday/element/' + characterData.element + '.png'; + effect.innerHTML = ''; + effect.style.position = 'absolute'; + effect.style.pointerEvents = 'none'; + const startPositionLeft = Math.random() * window.innerWidth; + const duration = Math.random() * 4 + 3 + 's'; + const delay = Math.random() * 10 + 's'; + effect.style.left = startPositionLeft + 'px'; + effect.style.animation = `snowfall ${duration} linear ${delay} infinite`; + document.body.appendChild(effect); + effect.addEventListener('animationiteration', () => { + effect.style.left = Math.random() * window.innerWidth + 'px'; + }); + } + function generateEffect() { + for (let i = 0; i < 5; i++) { + createEffect(); + } + } + if (characterData.element) { + generateEffect() + } + document.body.style.background = 'url(' + bgUrl + ')'; + document.body.style.backgroundSize = 'cover'; + document.body.style.backgroundRepeat = 'no-repeat'; + document.body.style.backgroundPosition = 'center'; + document.body.style.overflow = 'hidden'; + if (characterData.buttonColor) { + document.documentElement.style.setProperty('--button-color', characterData.buttonColor); + } else if (characterData.buttonColor && characterData.buttonTextColor) { + document.documentElement.style.setProperty('--button-color', characterData.buttonColor); + document.documentElement.style.setProperty('--button-text-color', characterData.buttonTextColor); + } + } + }) + .catch(err => console.error(err)); + } + }); } else { font.insertRule(mainFont, font.cssRules.length); buttonIds.forEach((buttonId) => { @@ -175,9 +228,62 @@ browser.storage.local.get(['onlyHsr', 'onlyGi']).then(function (result) { if (result.buttonTextColorMain) { document.documentElement.style.setProperty('--button-text-color', result.buttonTextColorMain); } - }); + }); + browser.storage.local.get(['mainBirthdayDisable']).then((result) => { + if (!result.mainBirthdayDisable) { + let today = new Date(); + let dd = String(today.getDate()).padStart(2, '0'); + let mm = String(today.getMonth() + 1).padStart(2, '0'); + today = mm + '-' + dd; + fetch('https://raw.githubusercontent.com/Kajitsy/Genshin-Star-Rail-CodeEntter/main/birthday.json') + .then(response => response.json()) + .then(birthdayData => { + if (birthdayData[today]) { + let characterData = birthdayData[today]; + let bgUrl = 'https://raw.githubusercontent.com/Kajitsy/Genshin-Star-Rail-CodeEntter/main/background_birthday/' + characterData.character + '.webp'; + function createEffect() { + const effect = document.createElement('div'); + effect.className = 'effect'; + let effectUrl = 'https://raw.githubusercontent.com/Kajitsy/Genshin-Star-Rail-CodeEntter/main/background_birthday/element/' + characterData.element + '.png'; + effect.innerHTML = ''; + effect.style.position = 'absolute'; + effect.style.pointerEvents = 'none'; + const startPositionLeft = Math.random() * window.innerWidth; + const duration = Math.random() * 4 + 3 + 's'; + const delay = Math.random() * 10 + 's'; + effect.style.left = startPositionLeft + 'px'; + effect.style.animation = `snowfall ${duration} linear ${delay} infinite`; + document.body.appendChild(effect); + effect.addEventListener('animationiteration', () => { + effect.style.left = Math.random() * window.innerWidth + 'px'; + }); + } + function generateEffect() { + for (let i = 0; i < 10; i++) { + createEffect(); + } + } + if (characterData.element) { + generateEffect() + } + document.body.style.background = 'url(' + bgUrl + ')'; + document.body.style.backgroundSize = 'cover'; + document.body.style.backgroundRepeat = 'no-repeat'; + document.body.style.backgroundPosition = 'center'; + document.body.style.overflow = 'hidden'; + if (characterData.buttonColor) { + document.documentElement.style.setProperty('--button-color', characterData.buttonColor); + } else if (characterData.buttonColor && characterData.buttonTextColor) { + document.documentElement.style.setProperty('--button-color', characterData.buttonColor); + document.documentElement.style.setProperty('--button-text-color', characterData.buttonTextColor); + } + } + }) + .catch(err => console.error(err)); + } + }); } }) browser.storage.local.get(['roundingDisable']).then((result) => { document.documentElement.style.setProperty('--border-radius', result.roundingDisable ? '10px' : '20px'); -}); +}); \ No newline at end of file