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:
@@ -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");
|
||||
}
|
||||
Reference in New Issue
Block a user