Skip to content

Commit ebfc33d

Browse files
committed
[bug] fix add link item missing first option
1 parent 6f565c9 commit ebfc33d

File tree

5 files changed

+10
-7
lines changed

5 files changed

+10
-7
lines changed

‎package-lock.json‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nightTab",
3-
"version": "5.55.0",
3+
"version": "5.55.1",
44
"description": "A neutral new tab page accented with a chosen colour. Customise the layout, style, background and bookmarks in nightTab.",
55
"main": "index.js",
66
"scripts":{

‎src/js/link.js‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2304,13 +2304,15 @@ var link = (function(){
23042304
};
23052305

23062306
varmakePostionOptions=function(){
2307-
if(stagedLink.position.destination.item>0){
2307+
if(bookmarks.get().length>0){
23082308

23092309
while(groupExistingPosition.lastChild){
23102310
groupExistingPosition.removeChild(groupExistingPosition.lastChild);
23112311
};
2312+
23122313
varoptionCount=0;
2313-
if(stagedLink.position.destination.item>0){
2314+
2315+
if(stagedLink.position.destination.item>=0){
23142316
if(options.useStagedLink&&stagedLink.position.origin.group==stagedLink.position.destination.group){
23152317
optionCount=optionCount+bookmarks.get()[stagedLink.position.origin.group].items.length;
23162318
}else{
@@ -2319,10 +2321,11 @@ var link = (function(){
23192321
}else{
23202322
optionCount=1;
23212323
};
2324+
23222325
for(vari=1;i<=optionCount;i++){
23232326
groupExistingPosition.appendChild(helper.node("option:"+helper.ordinalNumber(i)));
23242327
if(optionCount==i){
2325-
groupExistingPosition.selectedIndex=i-1;
2328+
groupExistingPosition.selectedIndex=(i-1);
23262329
}
23272330
};
23282331

‎src/js/version.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
varversion=(function(){
22

3-
varcurrent="5.55.0";
3+
varcurrent="5.55.1";
44

55
varname="Jaded Raven";
66

‎src/manifest.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "nightTab",
33
"short_name": "nightTab",
44
"description": "A neutral new tab page accented with a chosen colour. Customise the layout, style, background and bookmarks in nightTab.",
5-
"version": "5.55.0",
5+
"version": "5.55.1",
66
"manifest_version": 2,
77
"chrome_url_overrides":{
88
"newtab": "index.html"

0 commit comments

Comments
(0)