Created
March 23, 2015 18:57
-
-
Save thyagorafaell/abc7beea16dc8bf88f75 to your computer and use it in GitHub Desktop.
Remove indexedDbs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var removeDb = function(databaseName) { | |
| var req = indexedDB.deleteDatabase(databaseName); | |
| req.onsuccess = function () { | |
| console.log("Deleted database successfully. Base" + databaseName); | |
| }; | |
| req.onerror = function () { | |
| console.log("Couldn't delete database. Base" + databaseName); | |
| }; | |
| req.onblocked = function () { | |
| console.log("Couldn't delete database due to the operation being blocked. Base" + databaseName); | |
| }; | |
| } | |
| var dbs = [ | |
| 'anotherASDB', | |
| 'anotherASDB2', | |
| 'as-translate-2', | |
| 'as-translate-10', | |
| 'as-translate-11', | |
| 'as-translate-13', | |
| 'as-translate-3', | |
| 'as-translate-4', | |
| 'as-translate-5', | |
| 'as-translate-6', | |
| 'as-translate-7', | |
| 'as-translate-8', | |
| 'as-translate-9', | |
| 'as-translate-9', | |
| 'i18n-teste-local', | |
| 'notesDB', | |
| 'todos' | |
| ]; | |
| dbs.forEach(removeDb); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment