Hide edit context menu entry on <2 servers
This commit is contained in:
parent
7ee4429230
commit
88032c4e4e
@ -91,7 +91,8 @@ async function createContextMenu() {
|
|||||||
contexts: ['selection', 'link', 'page']
|
contexts: ['selection', 'link', 'page']
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// Add seperator and link to settings
|
// Add seperator and link to settings, but only if there's more than one server saved
|
||||||
|
if (data.serverList.length > 1) {
|
||||||
chrome.contextMenus.create({
|
chrome.contextMenus.create({
|
||||||
id: 'none',
|
id: 'none',
|
||||||
type: 'separator',
|
type: 'separator',
|
||||||
@ -99,10 +100,11 @@ async function createContextMenu() {
|
|||||||
})
|
})
|
||||||
chrome.contextMenus.create({
|
chrome.contextMenus.create({
|
||||||
id: 'edit-servers',
|
id: 'edit-servers',
|
||||||
title: 'Edit server list',
|
title: 'Edit server list...',
|
||||||
contexts: ['selection', 'link', 'page']
|
contexts: ['selection', 'link', 'page']
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Function for handling context menu clicks
|
// Function for handling context menu clicks
|
||||||
|
Loading…
x
Reference in New Issue
Block a user