diff --git a/public/_locales/en/messages.json b/public/_locales/en/messages.json
index 5809054f..d05dcfc6 100644
--- a/public/_locales/en/messages.json
+++ b/public/_locales/en/messages.json
@@ -516,5 +516,14 @@
},
"showOverlay": {
"message": "Show Overlay On Player"
+ },
+ "enableTestingServer": {
+ "message": "Enable Beta Testing Server"
+ },
+ "whatEnableTestingServer": {
+ "message": "Your submissions and votes WILL NOT COUNT towards the main server. Only use this for testing."
+ },
+ "testingServerWarning": {
+ "message": "All submissions and votes WILL NOT COUNT towards the main server while connecting to the test server. Make sure to disable this when you want to make real submissions."
}
}
diff --git a/public/options/options.html b/public/options/options.html
index a4530a02..0a93ad22 100644
--- a/public/options/options.html
+++ b/public/options/options.html
@@ -352,7 +352,23 @@
+
+
+
+
+
+
+
+
__MSG_whatEnableTestingServer__
+
+
+
diff --git a/src/config.ts b/src/config.ts
index a28d834f..0f73b649 100644
--- a/src/config.ts
+++ b/src/config.ts
@@ -27,6 +27,7 @@ interface SBConfig {
audioNotificationOnSkip,
checkForUnlistedVideos: boolean,
mobileUpdateShowCount: number,
+ testingServer: boolean,
// What categories should be skipped
categorySelections: CategorySelection[]
@@ -125,6 +126,8 @@ var Config: SBObject = {
audioNotificationOnSkip: false,
checkForUnlistedVideos: false,
mobileUpdateShowCount: 0,
+ testingServer: false,
+
categorySelections: [{
name: "sponsor",
option: CategorySkipOption.AutoSkip
diff --git a/src/options.ts b/src/options.ts
index 3fd13074..e9a622a5 100644
--- a/src/options.ts
+++ b/src/options.ts
@@ -32,6 +32,8 @@ async function init() {
let checkbox = optionsElements[i].querySelector("input");
let reverse = optionsElements[i].getAttribute("toggle-type") === "reverse";
+ let confirmMessage = optionsElements[i].getAttribute("confirm-message");
+
if (optionResult != undefined) {
checkbox.checked = optionResult;
@@ -49,6 +51,12 @@ async function init() {
// Add click listener
checkbox.addEventListener("click", () => {
+ // Confirm if required
+ if (checkbox.checked && confirmMessage && !confirm(chrome.i18n.getMessage(confirmMessage))){
+ checkbox.checked = false;
+ return;
+ }
+
Config.config[option] = reverse ? !checkbox.checked : checkbox.checked;
// See if anything extra must be run