implement removal
This commit is contained in:
parent
83749bfc72
commit
21679435e5
1 changed files with 10 additions and 3 deletions
|
@ -79,7 +79,13 @@ contextMenuInit = function(){
|
||||||
}
|
}
|
||||||
|
|
||||||
function removeContextMenuOption(uid){
|
function removeContextMenuOption(uid){
|
||||||
|
menuSpecs.forEach(function(v,k) {
|
||||||
|
let index = -1
|
||||||
|
v.forEach(function(e,ei){if(e['id']==uid){index=ei}})
|
||||||
|
if(index>=0){
|
||||||
|
v.splice(index, 1);
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function addContextMenuEventListener(){
|
function addContextMenuEventListener(){
|
||||||
|
@ -148,7 +154,8 @@ cancelGenerateForever = function(){
|
||||||
}
|
}
|
||||||
|
|
||||||
appendContextMenuOption('#txt2img_interrupt','Cancel generate forever',cancelGenerateForever)
|
appendContextMenuOption('#txt2img_interrupt','Cancel generate forever',cancelGenerateForever)
|
||||||
appendContextMenuOption('#txt2img_generate','Cancel generate forever',cancelGenerateForever)
|
appendContextMenuOption('#txt2img_generate', 'Cancel generate forever',cancelGenerateForever)
|
||||||
|
|
||||||
|
|
||||||
appendContextMenuOption('#roll','Roll three',
|
appendContextMenuOption('#roll','Roll three',
|
||||||
function(){
|
function(){
|
||||||
|
@ -162,4 +169,4 @@ appendContextMenuOption('#roll','Roll three',
|
||||||
|
|
||||||
onUiUpdate(function(){
|
onUiUpdate(function(){
|
||||||
addContextMenuEventListener()
|
addContextMenuEventListener()
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue