diff --git a/options/optionsGui.js b/options/optionsGui.js index 0161c9f..02202f4 100644 --- a/options/optionsGui.js +++ b/options/optionsGui.js @@ -222,17 +222,23 @@ footCell.colSpan = 3; let newInput = document.createElement("input"); newInput.title = browser.i18n.getMessage("inputURL"); - footCell.appendChild(newInput); - let footPlus = document.createElement("span"); - footPlus.classList.add("add"); - footPlus.textContent = "+"; - footPlus.addEventListener("click", function(){ + const addURLSetting = function(){ var url = newInput.value.trim(); if (url){ setting.set(setting.get(url), url); newInput.value = ""; } + }; + newInput.addEventListener("keypress", function(event){ + if ([10, 13].indexOf(event.keyCode) !== -1){ + addURLSetting(); + } }); + footCell.appendChild(newInput); + let footPlus = document.createElement("span"); + footPlus.classList.add("add"); + footPlus.textContent = "+"; + footPlus.addEventListener("click", addURLSetting); footCell.appendChild(footPlus); footRow.appendChild(footCell); foot.appendChild(footRow); diff --git a/releaseNotes.txt b/releaseNotes.txt index 1d82e6a..78c2fe5 100644 --- a/releaseNotes.txt +++ b/releaseNotes.txt @@ -3,7 +3,7 @@ Version 0.5.6: - new features: - - + - url specific values can be added by hitting enter in the input fixes: -