Skip to content

Commit

Permalink
bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
waldner committed Mar 4, 2022
1 parent ae5d44e commit c7432ad
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 18 deletions.
2 changes: 1 addition & 1 deletion addon/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "RunWith",
"description": "Run external commands on contextual elements",
"version": "0.16",
"version": "0.17",
"applications": {
"gecko": {
"id": "[email protected]",
Expand Down
25 changes: 8 additions & 17 deletions addon/settings/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function createTableRow(data){
input.type = 'text';
input.name = 'menu_title';
input.style.width = '100%';
if (data) {
if (data && (!(data.title == null || data.title == ""))) {
input.value = data.title;
}
input.placeholder = 'Menu text';
Expand All @@ -19,11 +19,9 @@ function createTableRow(data){
input.type = 'text';
input.name = 'nm_host';
input.style.width = '100%';
if (data) {
input.value = "runwith";
if (data && (!(data.nmhost == null || data.nmhost == ""))) {
input.value = data.nmhost;
if (input.value == null || input.value == "") {
input.value = "runwith";
}
}
input.placeholder = 'NM Host';
input.required = true;
Expand Down Expand Up @@ -55,12 +53,9 @@ function createTableRow(data){
input.type = 'text';
input.name = 'document_urls';
input.style.width = '100%';
if (data) {
if (data.documentUrlPatterns == null || data.documentUrlPatterns == "") {
input.value = "<all_urls>";
} else {
input.value = data.documentUrlPatterns;
}
input.value = "<all_urls>";
if (data && (!(data.documentUrlPatterns == null || data.documentUrlPatterns == ""))) {
input.value = data.documentUrlPatterns;
}
input.placeholder = 'Document URL patterns (optional)';
input.required = false;
Expand All @@ -70,13 +65,9 @@ function createTableRow(data){
input.type = 'text';
input.name = 'target_urls';
input.style.width = '100%';
if (data) {
input.value = "<all_urls>";
if (data && (!(data.targetUrlPatterns == null || data.targetUrlPatterns == ""))) {
input.value = data.targetUrlPatterns;
if (data.targetUrlPatterns == null || data.targetUrlPatterns == "") {
input.value = "<all_urls>";
} else {
input.value = data.targetUrlPatterns;
}
}
input.placeholder = 'Target URL patterns (optional)';
input.required = false;
Expand Down

0 comments on commit c7432ad

Please sign in to comment.