From d4ccddb8beb39c244693758de15cb91ddb2d7c3a Mon Sep 17 00:00:00 2001 From: Robert Kaiser Date: Fri, 14 Sep 2012 02:17:33 +0200 Subject: [PATCH] numeric transaction modes are deprecated --- js/ui.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/js/ui.js b/js/ui.js index d484274..8efe4c0 100644 --- a/js/ui.js +++ b/js/ui.js @@ -139,8 +139,7 @@ var gPrefs = { if (!mainDB) return; var success = false; - var transaction = mainDB.transaction([this.objStore], - IDBTransaction.READ_WRITE); + var transaction = mainDB.transaction([this.objStore], "readwrite"); var objStore = transaction.objectStore(this.objStore); var request = objStore.put(aValue, aKey); request.onsuccess = function(event) { @@ -159,8 +158,7 @@ var gPrefs = { if (!mainDB) return; var success = false; - var transaction = mainDB.transaction([this.objStore], - IDBTransaction.READ_WRITE); + var transaction = mainDB.transaction([this.objStore], "readwrite"); var request = transaction.objectStore(this.objStore).delete(aKey); request.onsuccess = function(event) { success = true; @@ -206,8 +204,7 @@ var gTrackStore = { push: function(aValue, aCallback) { if (!mainDB) return; - var transaction = mainDB.transaction([this.objStore], - IDBTransaction.READ_WRITE); + var transaction = mainDB.transaction([this.objStore], "readwrite"); var objStore = transaction.objectStore(this.objStore); var request = objStore.add(aValue); request.onsuccess = function(event) { @@ -225,8 +222,7 @@ var gTrackStore = { if (!mainDB) return; var success = false; - var transaction = mainDB.transaction([this.objStore], - IDBTransaction.READ_WRITE); + var transaction = mainDB.transaction([this.objStore], "readwrite"); var request = transaction.objectStore(this.objStore).clear(); request.onsuccess = function(event) { success = true; -- 2.43.0