Write placeholders for download-command inputs

This commit is contained in:
Jaidyn Ann 2024-03-03 22:56:30 -06:00
parent 0ba9d32915
commit 2c73b5a956
3 changed files with 24 additions and 2 deletions

View File

@ -136,6 +136,16 @@
"description": "Member of menu-list for options-page section for download commands. Completes the sentence, “Run when…”"
},
"optionsPlaceholderDownloadRegex": {
"message": ".*.png",
"description": "Displayed placeholder for options-page input for download commands regex."
},
"optionsPlaceholderDownloadCommand": {
"message": "echo $URL > $FILE.url",
"description": "Displayed placeholder for options-page input for download command."
},
"optionsSaveButton": {
"message": "Apply",
"description": "Name of button in options-page to save changes."

View File

@ -136,6 +136,16 @@
"description": "Menuero ĉe agordo-parto por elŝutaj ordonoj. Finas la frazon, «Rulu je…»"
},
"optionsPlaceholderDownloadRegex": {
"message": ".*.png",
"description": "Provizora valoro ĉe agordopaĝo por enigo de regula esprimo por elŝuta ordono."
},
"optionsPlaceholderDownloadCommand": {
"message": "echo $URL > $FILE.url",
"description": "Provizora valoro ĉe agordopaĝo por enigo de elŝuta ordono."
},
"optionsSaveButton": {
"message": "Konservi",
"description": "Nomo de butono ĉe agordopaĝo por konservi ŝanĝojn."

View File

@ -148,7 +148,8 @@ function createDownloadTr(regex, command, type) {
let regexInput = document.createElement("INPUT");
regexInput.setAttribute("class", "regex");
regexInput.setAttribute("type", "text");
regexInput.setAttribute("placeholder", browser.i18n.getMessage("optionsPlaceholderDownloadRule"));
regexInput.setAttribute("placeholder",
browser.i18n.getMessage("optionsPlaceholderDownloadRegex"));
if (regex && command && type)
regexInput.setAttribute("value", regex);
@ -158,7 +159,8 @@ function createDownloadTr(regex, command, type) {
let commandInput = document.createElement("INPUT");
commandInput.setAttribute("class", "command");
commandInput.setAttribute("type", "text");
commandInput.setAttribute("placeholder", browser.i18n.getMessage("optionsPlaceholderDownloadRule"));
commandInput.setAttribute("placeholder",
browser.i18n.getMessage("optionsPlaceholderDownloadCommand"));
if (regex && command && type)
commandInput.setAttribute("value", command);