File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ const createVariableSaver = (key, defaultValue = null) => ({
2020 } ,
2121} ) ;
2222
23- const createScriptsSaver = ( key ) => {
23+ const createScriptsSaver = ( key , addToHead = true ) => {
2424 const getIds = async ( ) =>
2525 ( await localStorage . get ( key , [ ] ) ) . filter (
2626 ( savedScriptId ) => savedScriptId in allScripts
@@ -30,7 +30,7 @@ const createScriptsSaver = (key) => {
3030 let exist = current . findIndex ( ( id ) => id === script . id ) >= 0 ;
3131 return exist ;
3232 } ;
33- const add = async ( script , addToHead = true ) => {
33+ const add = async ( script ) => {
3434 let current = await getIds ( ) ;
3535 let newList = current . filter ( ( id ) => id != script . id ) ; // remove duplicate
3636 if ( addToHead ) newList . unshift ( script . id ) ; // only save script id
You can’t perform that action at this time.
0 commit comments