CARVIEW |
Select Language
HTTP/2 301
location: https://raw.githubusercontent.com/nbubna/store/master/src/store.quota.js
accept-ranges: bytes
age: 0
date: Tue, 22 Jul 2025 14:57:08 GMT
via: 1.1 varnish
x-served-by: cache-bom-vanm7210092-BOM
x-cache: MISS
x-cache-hits: 0
x-timer: S1753196228.842841,VS0,VE239
vary: Accept-Encoding
x-fastly-request-id: 3e9631743d9f9c64e1f8d8330ca6c0f429a2a981
content-length: 0
HTTP/2 200
cache-control: max-age=300
content-security-policy: default-src 'none'; style-src 'unsafe-inline'; sandbox
content-type: text/plain; charset=utf-8
etag: W/"1e59378b8d8d0d62f4697775fdf6a1952b3247e6136ecf25d451e7e4e094bca5"
strict-transport-security: max-age=31536000
x-content-type-options: nosniff
x-frame-options: deny
x-xss-protection: 1; mode=block
x-github-request-id: AC85:2EF6D9:B7DA:16BB5:687FA6C2
content-encoding: gzip
accept-ranges: bytes
date: Tue, 22 Jul 2025 14:57:08 GMT
via: 1.1 varnish
x-served-by: cache-bom-vanm7210026-BOM
x-cache: MISS
x-cache-hits: 0
x-timer: S1753196228.135036,VS0,VE269
vary: Authorization,Accept-Encoding
access-control-allow-origin: *
cross-origin-resource-policy: cross-origin
x-fastly-request-id: 368180a2f90d48106bc4434d8387af37d32e9615
expires: Tue, 22 Jul 2025 15:02:08 GMT
source-age: 0
content-length: 664
/**
* Copyright (c) 2013 ESHA Research
* Dual licensed under the MIT and GPL licenses:
* https://www.opensource.org/licenses/mit-license.php
* https://www.gnu.org/licenses/gpl.html
*
* Bind handlers to quota errors:
* store.quota(function(e, area, key, str) {
* console.log(e, area, key, str);
* });
* If a handler returns true other handlers are not called and
* the error is suppressed.
*
* Think quota errors will never happen to you? Think again:
* https://spin.atomicobject.com/2013/01/23/ios-private-browsing-localstorage/
* (this affects sessionStorage too)
*
* Status: ALPHA - API could use unbind feature
*/
;(function(store, _) {
store.quota = function(fn) {
store.quota.fns.push(fn);
};
store.quota.fns = [];
var _set = _.set;
_.set = function(area, key, str) {
try {
_set.apply(this, arguments);
} catch (e) {
if (e.name === 'QUOTA_EXCEEDED_ERR' ||
e.name === 'NS_ERROR_DOM_QUOTA_REACHED') {
var fns = store.quota.fns;
for (var i=0,m=fns.length; i