CARVIEW |
Select Language
HTTP/2 301
location: https://raw.githubusercontent.com/nbubna/store/master/src/store.quota.js
accept-ranges: bytes
age: 0
date: Wed, 23 Jul 2025 03:06:08 GMT
via: 1.1 varnish
x-served-by: cache-bom-vanm7210046-BOM
x-cache: MISS
x-cache-hits: 0
x-timer: S1753239967.496905,VS0,VE961
vary: Accept-Encoding
x-fastly-request-id: 64d3101aca9283cb1a40eeee5535784780032f76
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: AB76:1D6F45:46067:10B1F9:6880519F
content-encoding: gzip
accept-ranges: bytes
date: Wed, 23 Jul 2025 03:06:08 GMT
via: 1.1 varnish
x-served-by: cache-bom-vanm7210056-BOM
x-cache: MISS
x-cache-hits: 0
x-timer: S1753239969.508502,VS0,VE262
vary: Authorization,Accept-Encoding
access-control-allow-origin: *
cross-origin-resource-policy: cross-origin
x-fastly-request-id: a35a9cd6c983ceeb8eb9d289e75da36cc1784ddd
expires: Wed, 23 Jul 2025 03:11: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