File tree 2 files changed +17
-7
lines changed
2 files changed +17
-7
lines changed Original file line number Diff line number Diff line change @@ -599,13 +599,22 @@ const Bookmarks = Module("bookmarks", {
599
599
"Delete a bookmark" ,
600
600
function ( args ) {
601
601
if ( args . bang ) {
602
- commandline . input ( "This will delete all bookmarks. Would you like to continue? (yes/[no]) " ,
603
- function ( resp ) {
604
- if ( resp && resp . match ( / ^ y ( e s ) ? $ / i) ) {
605
- bookmarks . _cache . bookmarks . forEach ( function ( bmark ) { services . get ( "bookmarks" ) . removeItem ( bmark . id ) ; } ) ;
606
- liberator . echomsg ( "All bookmarks deleted" ) ;
607
- }
608
- } ) ;
602
+
603
+ function deleteAll ( ) {
604
+ bookmarks . _cache . bookmarks . forEach ( function ( bmark ) { services . get ( "bookmarks" ) . removeItem ( bmark . id ) ; } ) ;
605
+ liberator . echomsg ( "All bookmarks deleted" ) ;
606
+ }
607
+
608
+ if ( commandline . silent )
609
+ deleteAll ( ) ;
610
+ else {
611
+ commandline . input ( "This will delete all bookmarks. Would you like to continue? (yes/[no]) " ,
612
+ function ( resp ) {
613
+ if ( resp && resp . match ( / ^ y ( e s ) ? $ / i) ) {
614
+ deleteAll ( ) ;
615
+ }
616
+ } ) ;
617
+ }
609
618
}
610
619
else {
611
620
let url = args . string || buffer . URL ;
Original file line number Diff line number Diff line change 2
2
* Version 3.8.3
3
3
* Push minVersion to Firefox25, as we have some problems on older Firefoxs regarding search
4
4
* Make 'gH' command work with multiple home pages
5
+ * Don't prompt user for confirmation when 'delbmarks!' command is invoked in silent mode
5
6
6
7
2014-02-14: A Valentine's gift
7
8
* Version 3.8.2
You can’t perform that action at this time.
0 commit comments