Skip to content

Commit

Permalink
2.2.0 Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Kajitsy authored Jan 5, 2024
1 parent 9873bb2 commit 1cf2c92
Show file tree
Hide file tree
Showing 13 changed files with 301 additions and 81 deletions.
17 changes: 13 additions & 4 deletions chromium/_locales/en/messages.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"extensionDescription": {
"message": "With Genshin/Star Rail CodeEntter you can quickly enter promo codes for Genshin Impact and Honkai Star Rail, and you can also share a link to this code ChromiumVersion 2.1.1"
"message": "With Genshin/Star Rail CodeEntter, you can quickly input promo codes for Genshin Impact and Honkai Star Rail, and also share a link to this tool :) ChromiumVersion 2.2.0"
},
"submit": {
"message": "Enter"
"message": "Submit"
},
"share": {
"message": "Share"
Expand Down Expand Up @@ -33,9 +33,18 @@
"message": "Reset"
},
"buttonColort": {
"message": "Button color:"
"message": "Button Color"
},
"buttonTextColort": {
"message": "Text color:"
"message": "Text Color"
},
"labelBacksettings": {
"message": "Use color instead of background in settings"
},
"labelBackground": {
"message": "Use color instead of background"
},
"labelBackgroundColor": {
"message": "Background Color (if enabled)"
}
}
21 changes: 15 additions & 6 deletions chromium/_locales/es/messages.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"extensionDescription": {
"message": "Con Genshin/Star Rail CodeEntter puedes ingresar rápidamente códigos promocionales para Genshin Impact y Honkai Star Rail, y también puedes compartir un enlace a este código ChromiumVersion 2.1.1"
"message": "Con Genshin/Star Rail CodeEntter, puedes ingresar rápidamente códigos promocionales para Genshin Impact y Honkai Star Rail, ¡y también compartir un enlace a esta herramienta :) ChromiumVersion 2.2.0"
},
"submit": {
"message": "Ingresar"
"message": "Enviar"
},
"share": {
"message": "Compartir"
Expand All @@ -15,7 +15,7 @@
"message": "Solo Honkai Star Rail"
},
"options": {
"message": "Configuraciones"
"message": "Configuración"
},
"submitGI": {
"message": "Genshin"
Expand All @@ -30,12 +30,21 @@
"message": "Compartir HSR"
},
"reset": {
"message": "Restablecer"
"message": "Reiniciar"
},
"buttonColort": {
"message": "Color del botón:"
"message": "Color de botones"
},
"buttonTextColort": {
"message": "Color del texto:"
"message": "Color de texto"
},
"labelBacksettings": {
"message": "Usar color en lugar de fondo en la configuración"
},
"labelBackground": {
"message": "Usar color en lugar de fondo"
},
"labelBackgroundColor": {
"message": "Color de fondo (si está habilitado)"
}
}
17 changes: 13 additions & 4 deletions chromium/_locales/jp/messages.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"extensionDescription": {
"message": "Genshin/Star Rail CodeEntterを使用すると、Genshin ImpactとHonkai Star Railのプロモーションコードをすばやく入力でき、このコードへのリンクを共有することもできます ChromiumVersion 2.1.1"
"message": "Genshin/Star Rail CodeEntterを使用すると、Genshin ImpactおよびHonkai Star Railのプロモコードを素早く入力でき、またこのツールのリンクを共有することもできます :) ChromiumVersion 2.2.0"
},
"submit": {
"message": "入力"
"message": "送信"
},
"share": {
"message": "共有"
Expand Down Expand Up @@ -33,9 +33,18 @@
"message": "リセット"
},
"buttonColort": {
"message": "ボタンの色"
"message": "ボタンの色"
},
"buttonTextColort": {
"message": "テキストの色:"
"message": "テキストの色"
},
"labelBacksettings": {
"message": "設定で背景の代わりに色を使用する"
},
"labelBackground": {
"message": "背景の代わりに色を使用する"
},
"labelBackgroundColor": {
"message": "背景の色(有効になっている場合)"
}
}
15 changes: 12 additions & 3 deletions chromium/_locales/ru/messages.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extensionDescription": {
"message": "Благодаря Genshin/Star Rail CodeEntter вы сможете быстро вводить промокоды для Genshin Impact и Honkai Star Rail, a также можете поделиться ссылкой на этот кодик :) ChromiumVersion 2.1.1"
"message": "Благодаря Genshin/Star Rail CodeEntter вы сможете быстро вводить промокоды для Genshin Impact и Honkai Star Rail, a также можете поделиться ссылкой на этот кодик :) ChromiumVersion 2.2.0"
},
"submit": {
"message": "Ввести"
Expand Down Expand Up @@ -33,9 +33,18 @@
"message": "Сбросить"
},
"buttonColort": {
"message": "Цвет кнопок:"
"message": "Цвет кнопок"
},
"buttonTextColort": {
"message": "Цвет текста:"
"message": "Цвет текста"
},
"labelBacksettings": {
"message": "Использовать цвет вместо фона в настройках"
},
"labelBackground": {
"message": "Использовать цвет вместо фона"
},
"labelBackgroundColor": {
"message": "Цвет фона (если включено)"
}
}
2 changes: 1 addition & 1 deletion chromium/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 3,
"name": "Genshin/Star Rail CodeEntter",
"version": "2.1.1",
"version": "2.2.0",
"description": "__MSG_extensionDescription__",
"default_locale": "en",
"icons": {
Expand Down
5 changes: 2 additions & 3 deletions chromium/onlyGi.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="UTF-8">
<style>
:root {
--button-color: #9a609a;
--button-color: #a89f96;
--button-text-color: white;
--input-color: rgba(0, 0, 0, 0.5);
--input-text-color: white;
Expand All @@ -16,7 +16,6 @@
body {
font-family: 'SDK_SC_Web';
padding: 10px;
background-image: url('/pictures/backgroundGI.png');
background-size: cover;
background-repeat: no-repeat;
background-position: center;
Expand Down Expand Up @@ -62,7 +61,7 @@
font-family: 'SDK_SC_Web';
}
#submit:hover, #share:hover, #options:hover {
transform: scale(1.1);
transform: scale(1.2);
border-radius: 10px;
display: flex;
align-items: center;
Expand Down
28 changes: 17 additions & 11 deletions chromium/onlyGi.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
if (typeof browser === "undefined") {
browser = chrome;
}
['submit', 'share', 'options'].forEach(function (buttonId) {
['submit', 'share'].forEach(function (buttonId) {
const buttonElement = document.getElementById(buttonId);
if (buttonElement) {
buttonElement.textContent = browser.i18n.getMessage(buttonId);
Expand All @@ -24,10 +24,6 @@ if (typeof browser === "undefined") {
displayOverlay();
break;

case 'options':
window.location.href = 'options.html';
break;

default:
break;
}
Expand All @@ -38,7 +34,6 @@ if (typeof browser === "undefined") {
document.getElementById('code').style.display = 'none';
document.getElementById('submit').style.display = 'none';
document.getElementById('share').style.display = 'none';
document.getElementById('options').style.display = 'none';
}
});
}
Expand Down Expand Up @@ -66,11 +61,22 @@ function displayOverlay() {
}, 2000);
}

browser.storage.local.get(['buttonColor', 'buttonTextColor']).then(function (result) {
if (result.buttonColor) {
document.documentElement.style.setProperty('--button-color', result.buttonColor);
browser.storage.local.get(['buttonColorGi', 'buttonTextColorGi', 'BackgroundGi', 'BackgroundColorGi']).then(function (result) {
if (result.buttonColorGi) {
document.documentElement.style.setProperty('--button-color', result.buttonColorGi);
}
if (result.buttonTextColorGi) {
document.documentElement.style.setProperty('--button-text-color', result.buttonTextColorGi);
}
if (result.buttonTextColor) {
document.documentElement.style.setProperty('--button-text-color', result.buttonTextColor);
if (result.BackgroundGi) {
document.body.style.background = '#4e4b54';
document.body.style.background = result.BackgroundColorGi;
}
else {
document.body.style.background = 'url("/pictures/backgroundGi.png")';
document.body.style.backgroundSize = 'cover';
document.body.style.backgroundRepeat = 'no-repeat';
document.body.style.backgroundPosition = 'center';
document.body.style.overflow = 'hidden';
}
});
5 changes: 2 additions & 3 deletions chromium/onlyHsr.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="UTF-8">
<style>
:root {
--button-color: #9a609a;
--button-color: #004080;
--button-text-color: white;
--input-color: rgba(0, 0, 0, 0.5);
--input-text-color: white;
Expand All @@ -16,7 +16,6 @@
body {
font-family: 'SDK_SC_Web';
padding: 10px;
background-image: url('/pictures/backgroundHSR.png');
background-size: cover;
background-repeat: no-repeat;
background-position: center;
Expand Down Expand Up @@ -63,7 +62,7 @@
font-family: 'SDK_SC_Web';
}
#submit:hover, #share:hover{
transform: scale(1.1);
transform: scale(1.2);
border-radius: 10px;
display: flex;
align-items: center;
Expand Down
28 changes: 17 additions & 11 deletions chromium/onlyHsr.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
if (typeof browser === "undefined") {
browser = chrome;
}
['submit', 'share', 'options'].forEach(function (buttonId) {
['submit', 'share'].forEach(function (buttonId) {
const buttonElement = document.getElementById(buttonId);
if (buttonElement) {
buttonElement.textContent = browser.i18n.getMessage(buttonId);
Expand All @@ -22,10 +22,6 @@ if (typeof browser === "undefined") {
displayOverlay();
break;

case 'options':
window.location.href = 'options.html';
break;

default:
break;
}
Expand All @@ -36,7 +32,6 @@ if (typeof browser === "undefined") {
document.getElementById('code').style.display = 'none';
document.getElementById('submit').style.display = 'none';
document.getElementById('share').style.display = 'none';
document.getElementById('options').style.display = 'none';
}
});
}
Expand Down Expand Up @@ -64,11 +59,22 @@ function displayOverlay() {
}, 2000);
}

browser.storage.local.get(['buttonColor', 'buttonTextColor']).then(function (result) {
if (result.buttonColor) {
document.documentElement.style.setProperty('--button-color', result.buttonColor);
browser.storage.local.get(['buttonColorHsr', 'buttonTextColorHsr', 'BackgroundHsr', 'BackgroundColorHsr']).then(function (result) {
if (result.buttonColorHsr) {
document.documentElement.style.setProperty('--button-color', result.buttonColorHsr);
}
if (result.buttonTextColorHsr) {
document.documentElement.style.setProperty('--button-text-color', result.buttonTextColorHsr);
}
if (result.buttonTextColor) {
document.documentElement.style.setProperty('--button-text-color', result.buttonTextColor);
if (result.BackgroundHsr) {
document.body.style.background = '#1e274e';
document.body.style.background = result.BackgroundColorHsr;
}
else {
document.body.style.background = 'url("/pictures/BackgroundHsr.png")';
document.body.style.backgroundSize = 'cover';
document.body.style.backgroundRepeat = 'no-repeat';
document.body.style.backgroundPosition = 'center';
document.body.style.overflow = 'hidden';
}
});
Loading

0 comments on commit 1cf2c92

Please sign in to comment.