Updated all bookmarklets to just be functions and we can use utils/bookmarkletMaker.js to generate the bookmarklets in the console for now.

This commit is contained in:
Greg Jacobs
2024-06-12 13:04:47 -04:00
parent 3f25aef4f2
commit e2c5035011
26 changed files with 587 additions and 380 deletions

View File

@@ -4,26 +4,26 @@
* Prompts the user to enter the environment and language in the format 'prod|ste,en|fr'.
* If the input is valid, it opens the corresponding URL in a new tab.
* If the input is invalid, it logs an error message to the console.
*
* Requires the use of utils/bookmarkletMaker.js to generate the bookmarklet.
*/
javascript: (function () {
const answer = prompt("Please enter the env and language in the format 'prod|ste,en|fr':");
const [env, language] = answer.split(",");
switch (env) {
case "prod":
if (language === "fr") {
window.open("https://www1.royalbank.com/french/netaction/sgnf.html", "_blank").focus();
} else {
window.open("https://www1.royalbank.com/english/netaction/sgne.html", "_blank").focus();
}
break;
case "ste":
if (language === "fr") {
window.open("https://www1.steroyalbank.com/french/netaction/sgnf.html", "_blank").focus();
} else {
window.open("https://www1.steroyalbank.com/english/netaction/sgne.html", "_blank").focus();
}
break;
default:
console.log("Invalid input");
}
})();
const answer = prompt("Please enter the env and language in the format 'prod|ste,en|fr':");
const [env, language] = answer.split(/,|\s/);
switch (env) {
case "prod":
if (language === "fr") {
window.open("https://www1.royalbank.com/french/netaction/sgnf.html", "_blank").focus();
} else {
window.open("https://www1.royalbank.com/english/netaction/sgne.html", "_blank").focus();
}
break;
case "ste":
if (language === "fr") {
window.open("https://www1.steroyalbank.com/french/netaction/sgnf.html", "_blank").focus();
} else {
window.open("https://www1.steroyalbank.com/english/netaction/sgne.html", "_blank").focus();
}
break;
default:
console.log("Invalid input");
}