Greasy Fork is available in English.

Storage.prototype_extension

Storage.prototype extension to store all kinds of data.

このスクリプトは単体で利用できません。右のようなメタデータを含むスクリプトから、ライブラリとして読み込まれます: // @require https://update.greasyfork.org/scripts/7573/47933/Storageprototype_extension.js

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください。
作者
Panayot Ivanov
バージョン
0.0.1.20150423075555
作成日
2015/01/20
更新日
2015/04/23
ライセンス
不明

/***************************************************************************************
****************************************************************************************
*****
***** Storage.prototype extension to store all kinds of data
*****
***** NOTE: Nested functions in objects are not supported (ignored).
*****
***** This library extends the Storage object used by localStorage and sessionStorage
***** to allow them to store all types of javascript variables with some optimizations.
*****
***** sessionStorage maintains a separate storage area for each given origin that's
***** available for the duration of the page session (as long as the browser is open,
***** including page reloads and restores).
*****
***** localStorage does the same thing,
***** but persists even when the browser is closed and reopened.
*****
***** Add it to your script with:
***** // @require https://greasyfork.org/scripts/7573-storage-prototype-extension/code/Storageprototype_extension.js?version=32731
*****
***** Usage:
***** localStorage.set (key, value);
***** sessionStorage.set (key, value);
*****
***** var x = localStorage.get (key, defaultValue);
***** var y = sessionStorage.get (key, defaultValue);
*****
***** Size:
***** Storage.getSize ();
*****
***** Test mode:
***** Storage.runTestCases ();
*****
*/