add sweden central

This commit is contained in:
Tyler Bean 2022-04-28 14:43:09 -05:00
parent 6a6dbc8651
commit a4f04c9d78
2 changed files with 36 additions and 12 deletions

View File

@ -6,7 +6,7 @@
// @require http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/jquery-ui.min.js // @require http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/jquery-ui.min.js
// @grant GM_addStyle // @grant GM_addStyle
// @grant GM_setClipboard // @grant GM_setClipboard
// @version 0.0.10 // @version 0.0.11
// ==/UserScript== // ==/UserScript==
// draw frame // draw frame
@ -89,6 +89,7 @@ if (window.location.href.indexOf("5d49ec10226b9e13cb6a422e") > -1) {
"southcentralus", "southcentralus",
"southeastasia", "southeastasia",
"southindia", "southindia",
"swedencentral",
"switzerlandnorth", "switzerlandnorth",
"switzerlandwest", "switzerlandwest",
"uaenorth", "uaenorth",
@ -175,6 +176,11 @@ if (window.location.href.indexOf("5d49ec10226b9e13cb6a422e") > -1) {
var buttonRegions = ["westindia"]; var buttonRegions = ["westindia"];
toggleRegion(buttonName, buttonRegions); toggleRegion(buttonName, buttonRegions);
}; };
function swedencentralButtonClickAction(zEvent) {
var buttonName = "swedencentralButton";
var buttonRegions = ["swedencentral"];
toggleRegion(buttonName, buttonRegions);
};
function switzerlandnorthButtonClickAction(zEvent) { function switzerlandnorthButtonClickAction(zEvent) {
var buttonName = "switzerlandnorthButton"; var buttonName = "switzerlandnorthButton";
var buttonRegions = ["switzerlandnorth"]; var buttonRegions = ["switzerlandnorth"];
@ -372,7 +378,7 @@ if (window.location.href.indexOf("5d49ec10226b9e13cb6a422e") > -1) {
}; };
function stage1ButtonClickAction(zEvent) { function stage1ButtonClickAction(zEvent) {
var buttonName = "stage1Button"; var buttonName = "stage1Button";
var buttonRegions = ["canadacentral", "canadaeast", "centralindia", "southindia", "westindia", "switzerlandnorth", "switzerlandwest", "norwayeast", "germanywestcentral"]; var buttonRegions = ["canadacentral", "canadaeast", "centralindia", "southindia", "westindia", "swedencentral", "switzerlandnorth", "switzerlandwest", "norwayeast", "germanywestcentral"];
toggleRegion(buttonName, buttonRegions); toggleRegion(buttonName, buttonRegions);
}; };
function stage1point5ButtonClickAction(zEvent) { function stage1point5ButtonClickAction(zEvent) {
@ -453,8 +459,9 @@ if (window.location.href.indexOf("5d49ec10226b9e13cb6a422e") > -1) {
'<button id="southindiaButton" style="width:156px" type="button">South India</button>' + '<button id="southindiaButton" style="width:156px" type="button">South India</button>' +
'<button id="westindiaButton" style="width:156px" type="button">West India</button>' + '<button id="westindiaButton" style="width:156px" type="button">West India</button>' +
'</br>' + '</br>' +
'<button id="switzerlandnorthButton" style="width:234px" type="button">Switzerland North</button>' + '<button id="swedencentralButton" style="width:156px" type="button">Sweden Central</button>' +
'<button id="switzerlandwestButton" style="width:234px" type="button">Switzerland West</button>' + '<button id="switzerlandnorthButton" style="width:156px" type="button">Switzerland North</button>' +
'<button id="switzerlandwestButton" style="width:156px" type="button">Switzerland West</button>' +
'</br>' + '</br>' +
'<button id="norwayeastButton" style="width:234px" type="button">Norway East</button>' + '<button id="norwayeastButton" style="width:234px" type="button">Norway East</button>' +
'<button id="germanywestcentralButton" style="width:234px" type="button">Germany West Central</button>' + '<button id="germanywestcentralButton" style="width:234px" type="button">Germany West Central</button>' +
@ -531,6 +538,7 @@ if (window.location.href.indexOf("5d49ec10226b9e13cb6a422e") > -1) {
"southcentralus", "southcentralus",
"southeastasia", "southeastasia",
"southindia", "southindia",
"swedencentral",
"switzerlandnorth", "switzerlandnorth",
"switzerlandwest", "switzerlandwest",
"uaenorth", "uaenorth",
@ -552,6 +560,7 @@ if (window.location.href.indexOf("5d49ec10226b9e13cb6a422e") > -1) {
document.getElementById("centralindiaButton").addEventListener("click", centralindiaButtonClickAction, false); document.getElementById("centralindiaButton").addEventListener("click", centralindiaButtonClickAction, false);
document.getElementById("southindiaButton").addEventListener("click", southindiaButtonClickAction, false); document.getElementById("southindiaButton").addEventListener("click", southindiaButtonClickAction, false);
document.getElementById("westindiaButton").addEventListener("click", westindiaButtonClickAction, false); document.getElementById("westindiaButton").addEventListener("click", westindiaButtonClickAction, false);
document.getElementById("swedencentralButton").addEventListener("click", swedencentralButtonClickAction, false);
document.getElementById("switzerlandnorthButton").addEventListener("click", switzerlandnorthButtonClickAction, false); document.getElementById("switzerlandnorthButton").addEventListener("click", switzerlandnorthButtonClickAction, false);
document.getElementById("switzerlandwestButton").addEventListener("click", switzerlandwestButtonClickAction, false); document.getElementById("switzerlandwestButton").addEventListener("click", switzerlandwestButtonClickAction, false);
document.getElementById("norwayeastButton").addEventListener("click", norwayeastButtonClickAction, false); document.getElementById("norwayeastButton").addEventListener("click", norwayeastButtonClickAction, false);
@ -614,8 +623,9 @@ if (window.location.href.indexOf("5d49ec10226b9e13cb6a422e") > -1) {
'<button id="canadacentralButton" style="width:234px" type="button">Canada Central</button>' + '<button id="canadacentralButton" style="width:234px" type="button">Canada Central</button>' +
'<button id="centralindiaButton" style="width:234px" type="button">Central India</button>' + '<button id="centralindiaButton" style="width:234px" type="button">Central India</button>' +
'</br>' + '</br>' +
'<button id="switzerlandnorthButton" style="width:234px" type="button">Switzerland North</button>' + '<button id="swedencentralButton" style="width:156px" type="button">Sweden Central</button>' +
'<button id="switzerlandwestButton" style="width:234px" type="button">Switzerland West</button>' + '<button id="switzerlandnorthButton" style="width:156px" type="button">Switzerland North</button>' +
'<button id="switzerlandwestButton" style="width:156px" type="button">Switzerland West</button>' +
'</br>' + '</br>' +
'<button id="norwayeastButton" style="width:234px" type="button">Norway East</button>' + '<button id="norwayeastButton" style="width:234px" type="button">Norway East</button>' +
'<button id="germanywestcentralButton" style="width:234px" type="button">Germany West Central</button>' + '<button id="germanywestcentralButton" style="width:234px" type="button">Germany West Central</button>' +
@ -664,6 +674,7 @@ if (window.location.href.indexOf("5d49ec10226b9e13cb6a422e") > -1) {
"norwayeast", "norwayeast",
"southafricanorth", "southafricanorth",
"southeastasia", "southeastasia",
"swedencentral",
"switzerlandnorth", "switzerlandnorth",
"switzerlandwest", "switzerlandwest",
"uaenorth", "uaenorth",
@ -679,6 +690,7 @@ if (window.location.href.indexOf("5d49ec10226b9e13cb6a422e") > -1) {
// regional listeners // regional listeners
document.getElementById("canadacentralButton").addEventListener("click", canadacentralCPButtonClickAction, false); document.getElementById("canadacentralButton").addEventListener("click", canadacentralCPButtonClickAction, false);
document.getElementById("swedencentralButton").addEventListener("click", swedencentralButtonClickAction, false);
document.getElementById("switzerlandnorthButton").addEventListener("click", switzerlandnorthButtonClickAction, false); document.getElementById("switzerlandnorthButton").addEventListener("click", switzerlandnorthButtonClickAction, false);
document.getElementById("switzerlandwestButton").addEventListener("click", switzerlandwestButtonClickAction, false); document.getElementById("switzerlandwestButton").addEventListener("click", switzerlandwestButtonClickAction, false);
document.getElementById("centralindiaButton").addEventListener("click", centralindiaCPButtonClickAction, false); document.getElementById("centralindiaButton").addEventListener("click", centralindiaCPButtonClickAction, false);

View File

@ -4,7 +4,7 @@
// @description Effort to simplify configuration of incidents/maintenance windows // @description Effort to simplify configuration of incidents/maintenance windows
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js // @require http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js
// @require http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/jquery-ui.min.js // @require http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/jquery-ui.min.js
// @version 0.0.10 // @version 0.0.11
// @downloadUrl https://gitea.frijole.lol/o0beaner/js-statusio-selector/raw/branch/main/statusio-selector.user.js // @downloadUrl https://gitea.frijole.lol/o0beaner/js-statusio-selector/raw/branch/main/statusio-selector.user.js
// @updateURL https://gitea.frijole.lol/o0beaner/js-statusio-selector/raw/branch/main/statusio-selector.user.js // @updateURL https://gitea.frijole.lol/o0beaner/js-statusio-selector/raw/branch/main/statusio-selector.user.js
// @include /^https?://app\.status\.io/dashboard/.*/?(maintenance|incident)/create$/ // @include /^https?://app\.status\.io/dashboard/.*/?(maintenance|incident)/create$/
@ -125,6 +125,7 @@ if (window.location.href.indexOf("5d49ec10226b9e13cb6a422e") > -1) {
"southcentralus", "southcentralus",
"southeastasia", "southeastasia",
"southindia", "southindia",
"swedencentral",
"switzerlandnorth", "switzerlandnorth",
"switzerlandwest", "switzerlandwest",
"uaenorth", "uaenorth",
@ -211,6 +212,11 @@ if (window.location.href.indexOf("5d49ec10226b9e13cb6a422e") > -1) {
var buttonRegions = ["westindia"]; var buttonRegions = ["westindia"];
toggleRegion(buttonName, buttonRegions); toggleRegion(buttonName, buttonRegions);
}; };
function swedencentralButtonClickAction(zEvent) {
var buttonName = "swedencentralButton";
var buttonRegions = ["swedencentral"];
toggleRegion(buttonName, buttonRegions);
};
function switzerlandnorthButtonClickAction(zEvent) { function switzerlandnorthButtonClickAction(zEvent) {
var buttonName = "switzerlandnorthButton"; var buttonName = "switzerlandnorthButton";
var buttonRegions = ["switzerlandnorth"]; var buttonRegions = ["switzerlandnorth"];
@ -408,7 +414,7 @@ if (window.location.href.indexOf("5d49ec10226b9e13cb6a422e") > -1) {
}; };
function stage1ButtonClickAction(zEvent) { function stage1ButtonClickAction(zEvent) {
var buttonName = "stage1Button"; var buttonName = "stage1Button";
var buttonRegions = ["canadacentral", "canadaeast", "centralindia", "southindia", "westindia", "switzerlandnorth", "switzerlandwest", "norwayeast", "germanywestcentral"]; var buttonRegions = ["canadacentral", "canadaeast", "centralindia", "southindia", "westindia", "swedencentral", "switzerlandnorth", "switzerlandwest", "norwayeast", "germanywestcentral"];
toggleRegion(buttonName, buttonRegions); toggleRegion(buttonName, buttonRegions);
}; };
function stage1point5ButtonClickAction(zEvent) { function stage1point5ButtonClickAction(zEvent) {
@ -489,8 +495,9 @@ if (window.location.href.indexOf("5d49ec10226b9e13cb6a422e") > -1) {
'<button id="southindiaButton" style="width:156px" type="button">South India</button>' + '<button id="southindiaButton" style="width:156px" type="button">South India</button>' +
'<button id="westindiaButton" style="width:156px" type="button">West India</button>' + '<button id="westindiaButton" style="width:156px" type="button">West India</button>' +
'</br>' + '</br>' +
'<button id="switzerlandnorthButton" style="width:234px" type="button">Switzerland North</button>' + '<button id="swedencentralButton" style="width:156px" type="button">Sweden Central</button>' +
'<button id="switzerlandwestButton" style="width:234px" type="button">Switzerland West</button>' + '<button id="switzerlandnorthButton" style="width:156px" type="button">Switzerland North</button>' +
'<button id="switzerlandwestButton" style="width:156px" type="button">Switzerland West</button>' +
'</br>' + '</br>' +
'<button id="norwayeastButton" style="width:234px" type="button">Norway East</button>' + '<button id="norwayeastButton" style="width:234px" type="button">Norway East</button>' +
'<button id="germanywestcentralButton" style="width:234px" type="button">Germany West Central</button>' + '<button id="germanywestcentralButton" style="width:234px" type="button">Germany West Central</button>' +
@ -567,6 +574,7 @@ if (window.location.href.indexOf("5d49ec10226b9e13cb6a422e") > -1) {
"southcentralus", "southcentralus",
"southeastasia", "southeastasia",
"southindia", "southindia",
"swedencentral",
"switzerlandnorth", "switzerlandnorth",
"switzerlandwest", "switzerlandwest",
"uaenorth", "uaenorth",
@ -588,6 +596,7 @@ if (window.location.href.indexOf("5d49ec10226b9e13cb6a422e") > -1) {
document.getElementById("centralindiaButton").addEventListener("click", centralindiaButtonClickAction, false); document.getElementById("centralindiaButton").addEventListener("click", centralindiaButtonClickAction, false);
document.getElementById("southindiaButton").addEventListener("click", southindiaButtonClickAction, false); document.getElementById("southindiaButton").addEventListener("click", southindiaButtonClickAction, false);
document.getElementById("westindiaButton").addEventListener("click", westindiaButtonClickAction, false); document.getElementById("westindiaButton").addEventListener("click", westindiaButtonClickAction, false);
document.getElementById("swedencentralButton").addEventListener("click", swedencentralButtonClickAction, false);
document.getElementById("switzerlandnorthButton").addEventListener("click", switzerlandnorthButtonClickAction, false); document.getElementById("switzerlandnorthButton").addEventListener("click", switzerlandnorthButtonClickAction, false);
document.getElementById("switzerlandwestButton").addEventListener("click", switzerlandwestButtonClickAction, false); document.getElementById("switzerlandwestButton").addEventListener("click", switzerlandwestButtonClickAction, false);
document.getElementById("norwayeastButton").addEventListener("click", norwayeastButtonClickAction, false); document.getElementById("norwayeastButton").addEventListener("click", norwayeastButtonClickAction, false);
@ -650,8 +659,9 @@ if (window.location.href.indexOf("5d49ec10226b9e13cb6a422e") > -1) {
'<button id="canadacentralButton" style="width:234px" type="button">Canada Central</button>' + '<button id="canadacentralButton" style="width:234px" type="button">Canada Central</button>' +
'<button id="centralindiaButton" style="width:234px" type="button">Central India</button>' + '<button id="centralindiaButton" style="width:234px" type="button">Central India</button>' +
'</br>' + '</br>' +
'<button id="switzerlandnorthButton" style="width:234px" type="button">Switzerland North</button>' + '<button id="swedencentralButton" style="width:156px" type="button">Sweden Central</button>' +
'<button id="switzerlandwestButton" style="width:234px" type="button">Switzerland West</button>' + '<button id="switzerlandnorthButton" style="width:156px" type="button">Switzerland North</button>' +
'<button id="switzerlandwestButton" style="width:156px" type="button">Switzerland West</button>' +
'</br>' + '</br>' +
'<button id="norwayeastButton" style="width:234px" type="button">Norway East</button>' + '<button id="norwayeastButton" style="width:234px" type="button">Norway East</button>' +
'<button id="germanywestcentralButton" style="width:234px" type="button">Germany West Central</button>' + '<button id="germanywestcentralButton" style="width:234px" type="button">Germany West Central</button>' +
@ -700,6 +710,7 @@ if (window.location.href.indexOf("5d49ec10226b9e13cb6a422e") > -1) {
"norwayeast", "norwayeast",
"southafricanorth", "southafricanorth",
"southeastasia", "southeastasia",
"swedencentral",
"switzerlandnorth", "switzerlandnorth",
"switzerlandwest", "switzerlandwest",
"uaenorth", "uaenorth",
@ -715,6 +726,7 @@ if (window.location.href.indexOf("5d49ec10226b9e13cb6a422e") > -1) {
// regional listeners // regional listeners
document.getElementById("canadacentralButton").addEventListener("click", canadacentralCPButtonClickAction, false); document.getElementById("canadacentralButton").addEventListener("click", canadacentralCPButtonClickAction, false);
document.getElementById("swedencentralButton").addEventListener("click", swedencentralButtonClickAction, false);
document.getElementById("switzerlandnorthButton").addEventListener("click", switzerlandnorthButtonClickAction, false); document.getElementById("switzerlandnorthButton").addEventListener("click", switzerlandnorthButtonClickAction, false);
document.getElementById("switzerlandwestButton").addEventListener("click", switzerlandwestButtonClickAction, false); document.getElementById("switzerlandwestButton").addEventListener("click", switzerlandwestButtonClickAction, false);
document.getElementById("centralindiaButton").addEventListener("click", centralindiaCPButtonClickAction, false); document.getElementById("centralindiaButton").addEventListener("click", centralindiaCPButtonClickAction, false);