added preparePromptsForExport method
This commit is contained in:
parent
6476675c78
commit
7c35a33a1c
1 changed files with 13 additions and 0 deletions
|
|
@ -153,6 +153,19 @@ export async function getPrompts(onlyEnabled = false){
|
|||
return output;
|
||||
}
|
||||
|
||||
export function preparePromptsForExport(prompts){
|
||||
let output = [...prompts];
|
||||
output.forEach(prompt => {
|
||||
if(prompt.is_default == 1){
|
||||
Object.keys(prompt).forEach(key => {
|
||||
if(!['enabled', 'position_compose', 'position_display'].includes(key)){
|
||||
delete prompt[key];
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
return output;
|
||||
}
|
||||
|
||||
async function getDefaultPrompts_withProps() {
|
||||
let prefs = await browser.storage.sync.get({_default_prompts_properties: null}); //production
|
||||
|
|
|
|||
Loading…
Reference in a new issue