Skip to content

Commit

Permalink
Update 2.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Kajitsy authored Jan 13, 2024
1 parent c56e676 commit 40ac0b5
Show file tree
Hide file tree
Showing 19 changed files with 259 additions and 213 deletions.
2 changes: 1 addition & 1 deletion chromium/_locales/en/messages.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extensionDescription": {
"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.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.2"
},
"submit": {
"message": "Submit"
Expand Down
2 changes: 1 addition & 1 deletion chromium/_locales/es/messages.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extensionDescription": {
"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.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.2"
},
"submit": {
"message": "Enviar"
Expand Down
2 changes: 1 addition & 1 deletion chromium/_locales/jp/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のプロモコードを素早く入力でき、またこのツールのリンクを共有することもできます :) ChromiumVersion 2.2.1"
"message": "Genshin/Star Rail CodeEntterを使用すると、Genshin ImpactおよびHonkai Star Railのプロモコードを素早く入力でき、またこのツールのリンクを共有することもできます :) ChromiumVersion 2.2.2"
},
"submit": {
"message": "送信"
Expand Down
2 changes: 1 addition & 1 deletion 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.2.1"
"message": "Благодаря Genshin/Star Rail CodeEntter вы сможете быстро вводить промокоды для Genshin Impact и Honkai Star Rail, a также можете поделиться ссылкой на этот кодик :) ChromiumVersion 2.2.2"
},
"submit": {
"message": "Ввести"
Expand Down
6 changes: 4 additions & 2 deletions chromium/dailychecker.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const HOSTS = [
];
var currentHSRHosts = HSRHOSTS;
var currentHosts = HOSTS;

var dcwork;
function getCurrDay() {
var now = new Date();
now.setMinutes(now.getMinutes() + now.getTimezoneOffset());
Expand Down Expand Up @@ -52,11 +52,12 @@ function request(i, currDay) {
.then(data => {
if(data.retcode == 0 || data.retcode == -5003) {
chrome.storage.local.set({dc_lastCheked: currDay});
dcwork = true;
currentHosts = [host];
currentHSRHosts = [hsrhost];
console.log("success", data);

} else if(data.retcode == -10002) {
dcwork = false;
console.log("badrequest", data);
request(i + 1);
} else {
Expand All @@ -65,6 +66,7 @@ function request(i, currDay) {
}
})
.catch(error => {
dcwork = false;
console.log("error", error);
request(i + 1);
});
Expand Down
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.2.1",
"version": "2.2.2",
"description": "__MSG_extensionDescription__",
"default_locale": "en",
"icons": {
Expand Down
52 changes: 31 additions & 21 deletions chromium/options.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,10 @@
src: url('GIfont.woff2') format('woff2');
}
body {
background-color: rgb(35, 34, 43);
font-family: 'SDK_SC_Web';
padding: 10px;
background-image: url('/pictures/backgroundOptions.png');
background-size: cover;
background-repeat: no-repeat;
background-position: center;
overflow: hidden;
min-height: 100vh;
}

label {
Expand All @@ -35,7 +32,7 @@

button {
padding: 10px 20px;
background-color: #4CAF50;
background-color: #9d9ca3;
color: white;
border: none;
cursor: pointer;
Expand Down Expand Up @@ -93,7 +90,14 @@
visibility: visible;
opacity: 1;
}

#dcWorkIcon{
width: 30px;
height: 30px;
border-radius: 50%;
position: fixed;
bottom: 10px;
right: 10px;
}
@media (prefers-color-scheme: dark) {
body {
background-color: rgb(28, 27, 34);
Expand All @@ -103,7 +107,7 @@
.settings-section {
display: block;
}
#onlyGi-settings, #onlyHsr-settings {
#main-popup-settings, #onlyGi-settings, #onlyHsr-settings {
display: none;
}
#settingsSectionSelector {
Expand All @@ -112,27 +116,30 @@
</style>
</head>
<body>
<div class="checkbox-label">
<label id="labelHsr">labelHsr</label>
<input type="checkbox" id="onlyHsr" style="margin-right: 10%;">
<label id="labelGi">labelGi</label>
<input type="checkbox" id="onlyGi" style="margin-right: 10%;">
<label id="labelBacksettings">labelBacksettings</label>
<input type="checkbox" id="backsettings">
</div>
<select id="settingsSectionSelector">
<option value="current-settings">Main Popup Settings</option>
<option value="global-settings">Global Settings</option>
<option value="main-popup-settings">Main Popup Settings</option>
<option value="onlyGi-settings">GI Popup Settings</option>
<option value="onlyHsr-settings">HSR Popup Settings</option>
</select>
<div id="current-settings" class="settings-section">
<div id="global-settings" class="settings-section">
<div class="checkbox-label">
<label id="labelHsr">labelHsr</label>
<input type="checkbox" id="onlyHsr">
</div>
<div class="checkbox-label">
<label id="labelGi">labelGi</label>
<input type="checkbox" id="onlyGi">
</div>
</div>
<div id="main-popup-settings" class="settings-section">
<div class="color-choice">
<label id="buttonColort">buttonColor</label>
<input type="color" id="buttonColor">
<input type="color" id="buttonColorMain">
</div>
<div class="color-choice">
<label id="buttonTextColort">buttonTextColor</label>
<input type="color" id="buttonTextColor">
<input type="color" id="buttonTextColorMain">
</div>
<button id="resetpopup">resetpopup</button>
</div>
Expand Down Expand Up @@ -172,7 +179,10 @@
<label id="labelBackgroundColorHsr">labelBackgroundColorHsr</label>
<input type="color" id="BackgroundColorHsr">
</div>
<button id="resetHsr">resetGi</button>
<button id="resetHsr">resetHsr</button>
</div>
<div id="dcWorkIcon">
<label id="labelDailyCheckerWork"></label>
</div>
<script src="options.js"></script>
</body>
Expand Down
Loading

0 comments on commit 40ac0b5

Please sign in to comment.