mirror of
https://github.com/zombieFox/nightTab.git
synced 2024-11-23 08:33:38 +01:00
[bug] fix link name null value
This commit is contained in:
parent
6affe552a2
commit
6d581ddde7
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "nightTab",
|
||||
"version": "5.36.0",
|
||||
"version": "5.37.1",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "nightTab",
|
||||
"version": "5.36.0",
|
||||
"version": "5.37.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": {
|
||||
|
@ -1,6 +1,6 @@
|
||||
::selection {
|
||||
background-color: rgb(var(--theme-accent));
|
||||
color: rgb(var(--theme-white));
|
||||
color: hsl(var(--theme-accent-accessible-color));
|
||||
}
|
||||
|
||||
html {
|
||||
|
@ -112,9 +112,10 @@ var clock = (function() {
|
||||
};
|
||||
if (state.get.current().header.clock.separator.show) {
|
||||
var separatorCharacter;
|
||||
if (state.get.current().header.clock.separator.text.trim().replace(/\s\s+/g, " ") != "") {
|
||||
if (typeof state.get.current().header.clock.separator.text == "string" && state.get.current().header.clock.separator.text != "") {
|
||||
separatorCharacter = state.get.current().header.clock.separator.text.trim().replace(/\s\s+/g, " ");
|
||||
} else {
|
||||
};
|
||||
if (separatorCharacter == "" || separatorCharacter == " " || separatorCharacter == undefined) {
|
||||
separatorCharacter = ":";
|
||||
};
|
||||
var parts = clock.querySelectorAll("span");
|
||||
|
@ -129,9 +129,10 @@ var date = (function() {
|
||||
};
|
||||
if (state.get.current().header.date.separator.show) {
|
||||
var separatorCharacter;
|
||||
if (state.get.current().header.date.separator.text.trim().replace(/\s\s+/g, " ") != "") {
|
||||
if (typeof state.get.current().header.date.separator.text == "string" && state.get.current().header.date.separator.text != "") {
|
||||
separatorCharacter = state.get.current().header.date.separator.text.trim().replace(/\s\s+/g, " ");
|
||||
} else {
|
||||
};
|
||||
if (separatorCharacter == "" || separatorCharacter == " " || separatorCharacter == undefined) {
|
||||
separatorCharacter = "/";
|
||||
};
|
||||
var parts = date.querySelectorAll("span");
|
||||
|
@ -373,7 +373,7 @@ var header = (function() {
|
||||
var headerSearchBody = helper.node("div|class:search-wrapper");
|
||||
var form = helper.node("form|class:search,action,method:get");
|
||||
var searchInput;
|
||||
if (state.get.current().header.search.engine.custom.queryName != "") {
|
||||
if (typeof state.get.current().header.search.engine.custom.queryName == "string" && state.get.current().header.search.engine.custom.queryName != "") {
|
||||
searchInput = helper.node("input|class:search-input,type:search,placeholder:Find or Search,name:" + state.get.current().header.search.engine.custom.queryName.trim() + ",autocomplete:off,autocorrect:off,autocapitalize:off,spellcheck:false,tabindex:1");
|
||||
} else {
|
||||
searchInput = helper.node("input|class:search-input,type:search,placeholder:Find or Search,name:q,autocomplete:off,autocorrect:off,autocapitalize:off,spellcheck:false,tabindex:1");
|
||||
|
@ -24,8 +24,8 @@ var layout = (function() {
|
||||
|
||||
render.title = function() {
|
||||
var title = helper.e("title");
|
||||
if (state.get.current().layout.title.trim().replace(/\s\s+/g, " ") != "") {
|
||||
title.textContent = state.get.current().layout.title;
|
||||
if (typeof state.get.current().layout.title == "string" && state.get.current().layout.title != "") {
|
||||
title.textContent = state.get.current().layout.title.trim().replace(/\s\s+/g, " ");
|
||||
} else {
|
||||
title.textContent = "New tab";
|
||||
};
|
||||
|
@ -18,9 +18,12 @@ var link = (function() {
|
||||
};
|
||||
|
||||
stagedGroup.init = function() {
|
||||
stagedGroup.group.items = [];
|
||||
stagedGroup.position.origin = 0;
|
||||
stagedGroup.position.destination = 0;
|
||||
stagedGroup.group.name.text = "";
|
||||
stagedGroup.group.name.show = true;
|
||||
stagedGroup.group.openAll.show = true;
|
||||
stagedGroup.group.items = [];
|
||||
};
|
||||
|
||||
stagedGroup.reset = function() {
|
||||
@ -66,7 +69,6 @@ var link = (function() {
|
||||
},
|
||||
name: null,
|
||||
url: null,
|
||||
timeStamp: null,
|
||||
accent: {
|
||||
by: null,
|
||||
hsl: {
|
||||
@ -94,6 +96,7 @@ var link = (function() {
|
||||
}
|
||||
},
|
||||
image: null,
|
||||
timeStamp: null,
|
||||
searchMatch: null
|
||||
}
|
||||
};
|
||||
@ -104,10 +107,17 @@ var link = (function() {
|
||||
stagedLink.position.destination.group = 0;
|
||||
stagedLink.position.destination.item = 0;
|
||||
stagedLink.position.group.new = false;
|
||||
stagedLink.position.group.name.show = false;
|
||||
stagedLink.position.group.openAll.show = false;
|
||||
stagedLink.position.group.name.show = true;
|
||||
stagedLink.position.group.name.text = "";
|
||||
stagedLink.position.group.openAll.show = true;
|
||||
stagedLink.link.visual.display = "letter";
|
||||
stagedLink.link.visual.letter = "";
|
||||
stagedLink.link.visual.image = "";
|
||||
stagedLink.link.visual.icon.name = "";
|
||||
stagedLink.link.visual.icon.prefix = "";
|
||||
stagedLink.link.visual.icon.label = "";
|
||||
stagedLink.link.name = "";
|
||||
stagedLink.link.url = "";
|
||||
stagedLink.link.accent.by = "theme";
|
||||
stagedLink.link.accent.hsl.h = 0;
|
||||
stagedLink.link.accent.hsl.s = 0;
|
||||
@ -132,7 +142,9 @@ var link = (function() {
|
||||
stagedLink.position.destination.group = null;
|
||||
stagedLink.position.destination.item = null;
|
||||
stagedLink.position.group.new = null;
|
||||
stagedLink.position.group.name.show = null;
|
||||
stagedLink.position.group.name.text = null;
|
||||
stagedLink.position.group.openAll.show = null;
|
||||
stagedLink.link.visual.display = null;
|
||||
stagedLink.link.visual.letter = null;
|
||||
stagedLink.link.visual.image = null;
|
||||
@ -141,7 +153,6 @@ var link = (function() {
|
||||
stagedLink.link.visual.icon.label = null;
|
||||
stagedLink.link.name = null;
|
||||
stagedLink.link.url = null;
|
||||
stagedLink.link.timeStamp = null;
|
||||
stagedLink.link.accent.by = null;
|
||||
stagedLink.link.accent.hsl.h = null;
|
||||
stagedLink.link.accent.hsl.s = null;
|
||||
@ -157,6 +168,7 @@ var link = (function() {
|
||||
stagedLink.link.color.rgb.g = null;
|
||||
stagedLink.link.color.rgb.b = null;
|
||||
stagedLink.link.image = null;
|
||||
stagedLink.link.timeStamp = null;
|
||||
stagedLink.link.searchMatch = null;
|
||||
};
|
||||
|
||||
@ -904,7 +916,7 @@ var link = (function() {
|
||||
value: "link-item"
|
||||
}]
|
||||
};
|
||||
if (stagedLink.link.accent.by == "custom" || stagedLink.link.color.by == "custom" || (stagedLink.link.image != null && stagedLink.link.image != "")) {
|
||||
if (stagedLink.link.accent.by == "custom" || stagedLink.link.color.by == "custom" || (stagedLink.link.image != null && typeof stagedLink.link.image == "string" && stagedLink.link.image != "")) {
|
||||
linkItemOptions.attr.push({
|
||||
key: "style",
|
||||
value: ""
|
||||
@ -985,9 +997,9 @@ var link = (function() {
|
||||
}]
|
||||
});
|
||||
};
|
||||
var nameText = stagedLink.link.name.trim();
|
||||
if (nameText == null) {
|
||||
nameText = "";
|
||||
var nameText = "";
|
||||
if (typeof stagedLink.link.name == "string" && stagedLink.link.name != "") {
|
||||
nameText = stagedLink.link.name.trim().replace(/\s\s+/g, " ");
|
||||
};
|
||||
var linkDisplayName = helper.node("p:" + nameText + "|class:link-display-name");
|
||||
|
||||
|
@ -967,7 +967,7 @@ var update = (function() {
|
||||
};
|
||||
return data;
|
||||
},
|
||||
"5.32.0": function(data) {
|
||||
"5.37.1": function(data) {
|
||||
data.bookmarks.forEach(function(arrayItem, index) {
|
||||
arrayItem.items.forEach(function(arrayItem, index) {
|
||||
arrayItem.accent.color.rgb = {
|
||||
@ -994,9 +994,6 @@ var update = (function() {
|
||||
delete arrayItem.accent.color.b;
|
||||
});
|
||||
});
|
||||
return data;
|
||||
},
|
||||
"5.33.0": function(data) {
|
||||
data.bookmarks.forEach(function(arrayItem, index) {
|
||||
arrayItem.items.forEach(function(arrayItem, index) {
|
||||
arrayItem.visual = {
|
||||
@ -1077,13 +1074,7 @@ var update = (function() {
|
||||
s: 0,
|
||||
l: 0
|
||||
};
|
||||
return data;
|
||||
},
|
||||
"5.34.0": function(data) {
|
||||
data.state.header.search.engine.custom.queryName = "";
|
||||
return data;
|
||||
},
|
||||
"5.35.0": function(data) {
|
||||
data.state.link.item.display.visual.shadow = {
|
||||
size: 0
|
||||
};
|
||||
|
@ -1,6 +1,6 @@
|
||||
var version = (function() {
|
||||
|
||||
var current = "5.36.0";
|
||||
var current = "5.37.1";
|
||||
|
||||
var name = "Zonked Tarsier";
|
||||
|
||||
|
@ -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.36.0",
|
||||
"version": "5.37.1",
|
||||
"manifest_version": 2,
|
||||
"chrome_url_overrides": {
|
||||
"newtab": "index.html"
|
||||
|
Loading…
Reference in New Issue
Block a user