PageSourceSearch

https://voteview.com/static/js/libs/localStorage.js

js voteview.com collected 2026-10-01 10:12:53 UTC 802 bytes, 25 lines download raw bytes

1// Mozilla developer test for local storage.
2
3function storageAvailable(type) {
4    try {
5        var storage = window[type],
6            x = '__storage_test__';
7        storage.setItem(x, x);
8        storage.removeItem(x);
9        return true;
10    }
11    catch(e) {
12        return e instanceof DOMException && (
13            // everything except Firefox
14            e.code === 22 ||
15            // Firefox
16            e.code === 1014 ||
17            // test name field too, because code might not be present
18            // everything except Firefox
19            e.name === 'QuotaExceededError' ||
20            // Firefox
21            e.name === 'NS_ERROR_DOM_QUOTA_REACHED') &&
22            // acknowledge QuotaExceededError only if there's something already stored
23            storage.length !== 0;
24    }
25}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.