[bug] fix new link form help text not disabling

This commit is contained in:
zombieFox 2020-05-04 09:01:00 +01:00
parent b9aee965f7
commit b4e0779f6d
5 changed files with 9 additions and 9 deletions

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{ {
"name": "nightTab", "name": "nightTab",
"version": "5.31.0", "version": "5.31.1",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {

View File

@ -1,6 +1,6 @@
{ {
"name": "nightTab", "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.", "description": "A neutral new tab page accented with a chosen colour. Customise the layout, style, background and bookmarks in nightTab.",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {

View File

@ -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 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 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 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); groupExistingRadioWrap.appendChild(groupExistingRadio);
groupExistingLable.appendChild(groupExistingLableIcon); groupExistingLable.appendChild(groupExistingLableIcon);
@ -1133,13 +1133,13 @@ var link = (function() {
accentCustomRadio.checked = true; accentCustomRadio.checked = true;
accentColorPicker.removeAttribute("disabled"); accentColorPicker.removeAttribute("disabled");
accentColorHex.removeAttribute("disabled"); accentColorHex.removeAttribute("disabled");
helper.removeClass(form.querySelector(".link-form-input-accent-helper"), "disabled"); helper.removeClass(accentColorInputHelperItem, "disabled");
} else { } else {
accentGlobalRadio.checked = true; accentGlobalRadio.checked = true;
accentCustomRadio.checked = false; accentCustomRadio.checked = false;
accentColorPicker.setAttribute("disabled", ""); accentColorPicker.setAttribute("disabled", "");
accentColorHex.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) { 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); accentColorPicker.value = helper.convertColor.rgb.hex(stagedLink.link.accent.color);
@ -1230,14 +1230,14 @@ var link = (function() {
stagedLink.link.accent.override = false; stagedLink.link.accent.override = false;
accentColorPicker.setAttribute("disabled", ""); accentColorPicker.setAttribute("disabled", "");
accentColorHex.setAttribute("disabled", ""); accentColorHex.setAttribute("disabled", "");
helper.addClass(accentColorInputHelper, "disabled"); helper.addClass(accentColorInputHelperItem, "disabled");
}, false); }, false);
accentCustomRadio.addEventListener("change", function() { accentCustomRadio.addEventListener("change", function() {
stagedLink.link.accent.override = true; stagedLink.link.accent.override = true;
stagedLink.link.accent.color = helper.convertColor.hex.rgb(accentColorPicker.value); stagedLink.link.accent.color = helper.convertColor.hex.rgb(accentColorPicker.value);
accentColorPicker.removeAttribute("disabled"); accentColorPicker.removeAttribute("disabled");
accentColorHex.removeAttribute("disabled"); accentColorHex.removeAttribute("disabled");
helper.removeClass(accentColorInputHelper, "disabled"); helper.removeClass(accentColorInputHelperItem, "disabled");
}, false); }, false);
accentColorPicker.addEventListener("change", function() { accentColorPicker.addEventListener("change", function() {
if (helper.isHexNumber(this.value)) { if (helper.isHexNumber(this.value)) {

View File

@ -1,6 +1,6 @@
var version = (function() { var version = (function() {
var current = "5.31.0"; var current = "5.31.1";
var name = "Zonked Tarsier"; var name = "Zonked Tarsier";

View File

@ -2,7 +2,7 @@
"name": "nightTab", "name": "nightTab",
"short_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.", "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, "manifest_version": 2,
"chrome_url_overrides": { "chrome_url_overrides": {
"newtab": "index.html" "newtab": "index.html"