Faster IndexedDB Geter

A library that can make you do the things of IndexedDB faster.

Dette script bør ikke installeres direkte. Det er et bibliotek, som andre scripts kan inkludere med metadirektivet // @require https://update.greasyfork.org/scripts/478225/1270031/Faster%20IndexedDB%20Geter.js

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// ==UserLibrary==
// @name        Faster IndexedDB Geter
// @grant       unsafeWindow
// @version     0.0
// @description A library that can make you do the things of IndexedDB faster.
// @author      PPPxcy
// @include     *
// @namespace   PPPScript
// ==/UserLibrary==
// ==/UserScript==

unsafeWindow.ReadIndexedDB = function ReadIndexedDB(storeName, groupName, keyName) {
	return new Promise((rsl, rej) => {try {
		(r => r.onsuccess = () => (t => t.onsuccess = () => rsl(t.result))(r.result.transaction([groupName], 'readonly').objectStore(groupName).get(keyName)))(unsafeWindow.indexedDB.open(storeName));
	} catch(err) { rej(err); }});
};