Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

27
LINES

< > BotCompany Repo | #1018986 // Test LargeLocalStorage

HTML

1  
<title>LargeLocalStorage Test</title>
2  
3  
<script src="http://tantaman.github.io/LargeLocalStorage/bower_components/jquery/jquery.js"></script>
4  
<script src="http://tinybrain.de:8080/getraw.php?id=1018989"></script>
5  
<script src="http://tinybrain.de:8080/getraw.php?id=1018990"></script>
6  
<script src="http://tinybrain.de:8080/getraw.php?id=1018988"></script>
7  
<script>
8  
// Specify desired capacity in bytes
9  
var desiredCapacity = 1 * 1024 * 1024;
10  
11  
console.log("Making LargeLocalStorage");
12  
13  
// Create a 125MB key-value store
14  
var storage = new LargeLocalStorage({size: desiredCapacity, name: 'myDb'});
15  
16  
console.log("Initializing LargeLocalStorage");
17  
18  
// Await initialization of the storage area
19  
storage.initialized.then(function(grantedCapacity) {
20  
  // Check to see how much space the user authorized us to actually use.
21  
  // Some browsers don't indicate how much space was granted in which case
22  
  // grantedCapacity will be 1.
23  
  console.log("Have granted capacity: " + grantedCapacity/1024 + " K");
24  
  if (grantedCapacity != -1 && grantedCapacity != desiredCapacity) {
25  
  }
26  
});
27  
</script>

download  render html  show line numbers   

Travelled to 12 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1018986
Snippet name: Test LargeLocalStorage
Eternal ID of this version: #1018986/9
Text MD5: a6aac207a36b59d3b15ef834ca30fe2f
Author: stefan
Category: javax / web
Type: HTML
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-10-19 16:47:17
Source code size: 1102 bytes / 27 lines
Pitched / IR pitched: No / No
Views / Downloads: 207 / 163
Version history: 8 change(s)
Referenced in: [show references]