js/main.js
// restore tables back to the default trusty database!

restore tables back to the default trusty database!
restore tables back to the default trusty database!
function restore() {
    var results = db.exec("SELECT DISTINCT `tbl_name` FROM `sqlite_master` WHERE tbl_name != 'sqlite_sequence'")
    for (var i = 0; i < results[0].values.length; i++) {
        var tbl_name = results[0].values[i][0]
        db.exec("DROP TABLE `" + tbl_name + "`");
    }
    for (var c in Cookies.get()) {
        Cookies.remove(c)
    }
    DefaultDB()
    saveDB(db)
    removeCookies()
    cleanView(true)
}
function restore ( ) { var results = db . exec ( "SELECT DISTINCT `tbl_name` FROM `sqlite_master` WHERE tbl_name != 'sqlite_sequence'" ) for ( var i = 0 ; i < results [ 0 ] . values . length ; i ++ ) { var tbl_name = results [ 0 ] . values [ i ] [ 0 ] db . exec ( "DROP TABLE `" + tbl_name + "`" ) ; } for ( var c in Cookies . get ( ) ) { Cookies . remove ( c ) } DefaultDB ( ) saveDB ( db ) removeCookies ( ) cleanView ( true ) }
restore tables back to the default trusty database!
restore tables back to the default trusty database!
// grab all tables
 // and remove them one-by-one
 // remove all the cookies for the questions
 // update it (Update this to a file!)
 // then save it
 // clean up the views and remove the cookies
