mirror of
https://github.com/zombieFox/nightTab.git
synced 2024-12-27 00:59:00 +01:00
[feature] allow hex value for background colour
This commit is contained in:
parent
7818228d96
commit
bf58d25c45
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "nighttab",
|
||||
"version": "3.75.2",
|
||||
"version": "3.76.0",
|
||||
"description": "A neutral new tab page accented with a chosen colour. Customise the layout, style, background and bookmarks in nightTab.",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
@ -1051,7 +1051,10 @@
|
||||
</div>
|
||||
<div class="form-indent">
|
||||
<div class="input-wrap">
|
||||
<input id="control-background-color-custom-current" class="control-background-color-custom-current mb-0" type="color" tabindex="1">
|
||||
<div class="form-group mb-0">
|
||||
<input id="control-background-color-custom-current-picker" class="form-group-item-half control-background-color-custom-current-picker mb-0" type="color" value="#000000" tabindex="1">
|
||||
<input id="control-background-color-custom-current-hex" class="form-group-item-half control-background-color-custom-current-hex mb-0" type="text" placeholder="Hex code" value="#000000" tabindex="1" maxlength="7">
|
||||
</div>
|
||||
</div>
|
||||
<p class="control-background-color-theme-helper form-helper small">Take care as some colours may make the Clock, Date and other text unreadable.</p>
|
||||
</div>
|
||||
|
@ -115,8 +115,13 @@ var background = (function() {
|
||||
|
||||
render.input = {
|
||||
clear: function() {
|
||||
var input = helper.e(".control-background-image-file");
|
||||
input.value = "";
|
||||
helper.e(".control-background-image-file").value = "";
|
||||
},
|
||||
picker: function() {
|
||||
helper.e(".control-background-color-custom-current-picker").value = helper.rgbToHex(state.get().background.color.custom);
|
||||
},
|
||||
hex: function() {
|
||||
helper.e(".control-background-color-custom-current-hex").value = helper.rgbToHex(state.get().background.color.custom);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -2137,11 +2137,21 @@ var control = (function() {
|
||||
render.class();
|
||||
}
|
||||
}, {
|
||||
element: helper.e(".control-background-color-custom-current"),
|
||||
element: helper.e(".control-background-color-custom-current-picker"),
|
||||
path: "background.color.custom",
|
||||
type: "color",
|
||||
func: function() {
|
||||
background.render.color();
|
||||
background.render.input.hex();
|
||||
}
|
||||
}, {
|
||||
element: helper.e(".control-background-color-custom-current-hex"),
|
||||
path: "background.color.custom",
|
||||
type: "text",
|
||||
valueMod: ["hexTextString"],
|
||||
func: function() {
|
||||
background.render.color();
|
||||
background.render.input.picker();
|
||||
}
|
||||
}, {
|
||||
element: helper.e(".control-background-image-show"),
|
||||
@ -3071,10 +3081,12 @@ var control = (function() {
|
||||
_disable.element(".control-background-image-url-helper", true);
|
||||
};
|
||||
if (state.get().background.color.by == "theme") {
|
||||
_disable.input(".control-background-color-custom-current", true);
|
||||
_disable.input(".control-background-color-custom-current-picker", true);
|
||||
_disable.input(".control-background-color-custom-current-hex", true);
|
||||
_disable.element(".control-background-color-theme-helper", true);
|
||||
} else if (state.get().background.color.by == "custom") {
|
||||
_disable.input(".control-background-color-custom-current", false);
|
||||
_disable.input(".control-background-color-custom-current-picker", false);
|
||||
_disable.input(".control-background-color-custom-current-hex", false);
|
||||
_disable.element(".control-background-color-theme-helper", false);
|
||||
};
|
||||
};
|
||||
|
@ -1,6 +1,6 @@
|
||||
var version = (function() {
|
||||
|
||||
var current = "3.75.2";
|
||||
var current = "3.76.0";
|
||||
|
||||
var compare = function(a, b) {
|
||||
var pa = a.split(".");
|
||||
|
@ -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": "3.75.2",
|
||||
"version": "3.76.0",
|
||||
"manifest_version": 2,
|
||||
"chrome_url_overrides": {
|
||||
"newtab": "index.html"
|
||||
|
Loading…
Reference in New Issue
Block a user