From b4e0779f6dba3f6959be63aa84aaf259494e3183 Mon Sep 17 00:00:00 2001 From: zombieFox Date: Mon, 4 May 2020 09:01:00 +0100 Subject: [PATCH] [bug] fix new link form help text not disabling --- package-lock.json | 2 +- package.json | 2 +- src/js/link.js | 10 +++++----- src/js/version.js | 2 +- src/manifest.json | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index 39378b5d..a96de735 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "nightTab", - "version": "5.31.0", + "version": "5.31.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 5ec5919e..e8bf269a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nightTab", - "version": "5.31.0", + "version": "5.31.1", "description": "A neutral new tab page accented with a chosen colour. Customise the layout, style, background and bookmarks in nightTab.", "main": "index.js", "scripts": { diff --git a/src/js/link.js b/src/js/link.js index 775d0ffe..056c8a0a 100644 --- a/src/js/link.js +++ b/src/js/link.js @@ -961,7 +961,7 @@ var link = (function() { var accentColorPicker = helper.node("input|id:link-form-input-accent-picker,class:form-group-item-half link-form-input-accent-picker,type:color,value:#000000,tabindex:1,disabled"); var accentColorHex = helper.node("input|id:link-form-input-accent-hex,class:form-group-item-half link-form-input-accent-hex,type:text,placeholder:Hex code,value:#000000,tabindex:1,maxlength:7,disabled"); var accentColorInputHelper = helper.node("div|class:form-helper"); - var accentColorInputHelperItem = helper.node("p:Use this colour to override the global accent colour.|class:link-form-input-accent-helper form-helper-item"); + var accentColorInputHelperItem = helper.node("p:Use this colour to override the global accent colour.|class:link-form-input-accent-helper form-helper-item disabled"); groupExistingRadioWrap.appendChild(groupExistingRadio); groupExistingLable.appendChild(groupExistingLableIcon); @@ -1133,13 +1133,13 @@ var link = (function() { accentCustomRadio.checked = true; accentColorPicker.removeAttribute("disabled"); accentColorHex.removeAttribute("disabled"); - helper.removeClass(form.querySelector(".link-form-input-accent-helper"), "disabled"); + helper.removeClass(accentColorInputHelperItem, "disabled"); } else { accentGlobalRadio.checked = true; accentCustomRadio.checked = false; accentColorPicker.setAttribute("disabled", ""); accentColorHex.setAttribute("disabled", ""); - helper.addClass(form.querySelector(".link-form-input-accent-helper"), "disabled"); + helper.addClass(accentColorInputHelperItem, "disabled"); }; if (stagedLink.link.accent.color.r != null && stagedLink.link.accent.color.g != null && stagedLink.link.accent.color.b != null) { accentColorPicker.value = helper.convertColor.rgb.hex(stagedLink.link.accent.color); @@ -1230,14 +1230,14 @@ var link = (function() { stagedLink.link.accent.override = false; accentColorPicker.setAttribute("disabled", ""); accentColorHex.setAttribute("disabled", ""); - helper.addClass(accentColorInputHelper, "disabled"); + helper.addClass(accentColorInputHelperItem, "disabled"); }, false); accentCustomRadio.addEventListener("change", function() { stagedLink.link.accent.override = true; stagedLink.link.accent.color = helper.convertColor.hex.rgb(accentColorPicker.value); accentColorPicker.removeAttribute("disabled"); accentColorHex.removeAttribute("disabled"); - helper.removeClass(accentColorInputHelper, "disabled"); + helper.removeClass(accentColorInputHelperItem, "disabled"); }, false); accentColorPicker.addEventListener("change", function() { if (helper.isHexNumber(this.value)) { diff --git a/src/js/version.js b/src/js/version.js index 48614520..5f9a4e88 100644 --- a/src/js/version.js +++ b/src/js/version.js @@ -1,6 +1,6 @@ var version = (function() { - var current = "5.31.0"; + var current = "5.31.1"; var name = "Zonked Tarsier"; diff --git a/src/manifest.json b/src/manifest.json index 48b7a2a5..00a26edd 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -2,7 +2,7 @@ "name": "nightTab", "short_name": "nightTab", "description": "A neutral new tab page accented with a chosen colour. Customise the layout, style, background and bookmarks in nightTab.", - "version": "5.31.0", + "version": "5.31.1", "manifest_version": 2, "chrome_url_overrides": { "newtab": "index.html"