<commit_before><!DOCTYPE html>
<html>
<head>
<title>vault.js demo</title>
<style type="text/css">
ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
ol > li {
    margin-bottom: 10px;
}
input {
    width: 200px;
}
</style>
</head>
<body>
<h1>vault.js - a wrapper for localStorage, sessionStorage and document.cookie</h1>
<ol>
    <li>Open the console</li>
    <li>Select storage type:
        <select id="type">
            <option value="Local">localStorage</option>
            <option value="Session">sessionStorage</option>
            <option value="Cookie">Cookie</option>
        </select>
    </li>
    <li>
        <form id="set">
            <ul>
                <li>name = <input type="text" value="Jimmy" id="name" placeholder="name"></li>
                <li>age = <input type="number" value="33" id="number" placeholder="age"></li>
                <li>array = <input type="text" value="[7,13,27]" id="arr"></li>
                <li>object = <input type="text" value='{ "name":"Jimmy", "age":33 }' id="obj"></li>
            </ul>
            <input type="submit" value="set values">
        </form>
    </li>
    <li><a id="list" href="#list">List all values</a></li>
    <li><a href='javascript:alert(Vault.Local.get("age"));return false;'>alert Vault.Local.get("age")</a></li>
    <li><a href='javascript:alert(Vault.Local.get("arr"));return false;'>alert Vault.Local.get("arr")</a></li>
    <li><a href='javascript:alert(Vault.Local.get("obj").name);return false;'>alert Vault.Local.get("ojb").name</a></li>
    <li><a id="clear" href="#clear">Clear all values</a></li>
</ol>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
<script src="vault.js" type="text/javascript"></script>
<script type="text/javascript">
$("#set").submit(function(e) {
    e.preventDefault();
    var _type = $("#type").val();
    var _name = $("#name").val();
    console.log('executing: Vault.'+_type+'.set("name", '+_name+');');
    Vault[_type].set("name", _name);
    var _number = $("#number").val();
    console.log('executing: Vault.'+_type+'.set("age", '+_number+');');<commit_msg>trying to get the demo right<commit_after><!DOCTYPE html>
<html>
<head>
<title>vault.js demo</title>
<style type="text/css">
ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
ol > li {
    margin-bottom: 10px;
}
input {
    width: 200px;
}
</style>
</head>
<body>
<h1>vault.js - a wrapper for localStorage, sessionStorage and document.cookie</h1>
<ol>
    <li>Open the console</li>
    <li>Select storage type:
        <select id="type">
            <option value="Local">localStorage</option>
            <option value="Session">sessionStorage</option>
            <option value="Cookie">Cookie</option>
        </select>
    </li>
    <li>
        <form id="set">
            <ul>
                <li>name = <input type="text" value="Jimmy" id="name" placeholder="name"></li>
                <li>age = <input type="number" value="33" id="number" placeholder="age"></li>
                <li>array = <input type="text" value="[7,13,27]" id="arr"></li>
                <li>object = <input type="text" value='{ "name":"Jimmy", "age":33 }' id="obj"></li>
            </ul>
            <input type="submit" value="set values">
        </form>
    </li>
    <li><a id="list" href="#list">List all values</a></li>
    <li><a href='javascript:alert(Vault.Local.get("age"));' onclick="return false;">alert Vault.Local.get("age")</a></li>
    <li><a href='javascript:alert(Vault.Local.get("arr"));' onclick="return false;">alert Vault.Local.get("arr")</a></li>
    <li><a href='javascript:alert(Vault.Local.get("obj").name);' onclick="return false;">alert Vault.Local.get("ojb").name</a></li>
    <li><a id="clear" href="#clear">Clear all values</a></li>
</ol>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
<script src="vault.js" type="text/javascript"></script>
<script type="text/javascript">
$("#set").submit(function(e) {
    e.preventDefault();
    var _type = $("#type").val();
    var _name = $("#name").val();
    console.log('executing: Vault.'+_type+'.set("name", '+_name+');');
    Vault[_type].set("name", _name);
    var _number = $("#number").val();
    console.log('executing: Vault.'+_type+'.set("age", '+_number+');');
{'fraction_non_alphanumeric': 0.22933884297520662, 'fraction_numerical': 0.009641873278236915, 'mean_word_length': 3.4323499491353, 'pattern_counts': {'":': 4, '<': 141, '<?xml version=': 0, '>': 143, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4275632', 'n_tokens_mistral': 1526, 'n_tokens_neox': 1478, 'n_words': 277}