From fbd8f1a0ea0e682241a1a113a08c35a91ae4eed8 Mon Sep 17 00:00:00 2001 From: Abhishek Sinha Date: Tue, 8 Jan 2019 12:27:24 +0530 Subject: [PATCH] added script to fetch js code from indexed db --- supernode/index.html | 86 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 83 insertions(+), 3 deletions(-) diff --git a/supernode/index.html b/supernode/index.html index c9813a9..7d69d9d 100644 --- a/supernode/index.html +++ b/supernode/index.html @@ -9571,7 +9571,6 @@ switch (method) { case "trade_buy": - localbitcoinplusplus.rpc.prototype.filter_legit_requests(function (is_valid_request) { if (is_valid_request !== true) return false; @@ -9910,7 +9909,6 @@ } }); - break; case "withdraw_request_method": localbitcoinplusplus.rpc.prototype.filter_legit_requests(function (is_valid_request) { @@ -11785,9 +11783,15 @@ timestamp: null } + const d3js = { + version: null, + filehash: null, + content: null + } + var db; const DBName = "localbitcoinDB"; - var request = window.indexedDB.open(DBName, 3); + var request = window.indexedDB.open(DBName, 5); request.onerror = function (event) { //https://stackoverflow.com/questions/13972385/invalidstateerror-while-opening-indexeddb-in-firefox @@ -11798,6 +11802,7 @@ request.onsuccess = function (event) { db = request.result; + runInitialDBOperations(); }; request.onupgradeneeded = function (event) { @@ -11908,6 +11913,11 @@ unique: false }); } + if (!db.objectStoreNames.contains('d3js')) { + var objectStore = db.createObjectStore("d3js", { + keyPath: 'filehash' + }); + } } @@ -12070,6 +12080,22 @@ + + + + + + + Pick a JS file, and it will be attached to body: + + + + + + \ No newline at end of file