<commit_before><!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>BLEXT editor</title>
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <link href="css/style.css" rel="stylesheet">
    <link href="css/index.css" rel="stylesheet">
    <link href="css/bootstrap-markdown.min.css" rel="stylesheet">
    <link href="css/sidebar.min.css" rel="stylesheet">

    <script src="https://use.fontawesome.com/ab291d07ba.js"></script>
</head>

<body>
    <div class="wrapper jsc-sidebar-content jsc-sidebar-pulled">
        <nav class="top-nav">
            <div>
                <i class="fa fa-bars jsc-sidebar-trigger link-menu" aria-hidden="true"></i>                
            </div>
        </nav>
        <textarea name="plainText" id="plainText"  placeholder="Write your Markdown content here" style="outline: none;"></textarea>
    </div>
    <nav class="sidebar jsc-sidebar" id="jsi-nav" data-sidebar-options="">
        <ul class="sidebar-list">
            <li><a href="#SignIn" data-toggle="collapse"  class="current">Sign In</a></li>
			<li>
				<form id="SignIn" " class="sidebar-collapse collapse" role="form" style="padding-left: 5px; padding-right:5px;">
					<div class="form-group">
						<label for="exampleInputEmail1">Email address</label>
						<input type="email" class="form-control" id="exampleInputEmail1" placeholder="Enter email">
					</div>
					<div class="form-group">
						<label for="exampleInputPassword1">Password</label>
						<input type="password" class="form-control" id="exampleInputPassword1" placeholder="Password">
					</div>
					<button type="button" class="btn btn-default"onclick="reqAuth()">提交</button>
					<script>
						/*function decoding(data){
							//enable to show data with selectedbyId blogList
							$(data).appendTo("#blogList");
							alert(JSON.stringify(data));
						}*/
						function reqAuth(){
							$.ajax({
								header:{
									'Authorization': 'Basic ' + btoa('<EMAIL>:cat')
								},
								url:"http://127.0.0.1/contactsList.html",
								datatype:'json',
								success:function(e,data){
									alert($("textarea#plainText").value.constructor.Name);
									$("textarea#plainText").fn.markdown.setContent(JSON.stringify(data));
									$(data).appendTo("#blogList");
									alert(JSON.stringify(data));
								}	
								})/*.done(function(data){
									$(data).appendTo("#blogList");
									alert(JSON.stringify(data));
								});	*/		
						}
						
					</script>
				</form>
			</li>
            <li><a href="#blogList" data-toggle="collapse" >View History</a></li>
			<li>
					<div href="#" id="blogList" class="sidebar-collapse collapse">
					<!--put the list of blogs here-->
					</div>
			</li>
            <li><a href="#" data-toggle="collapse" >Options</a></li>
        </ul>
    </nav>
    <script src="js/jquery.min.js"></script>
    <script src="js/bootstrap.min.js"></script>
    <script src="js/marked.min.js"></script>
    <script src="js/sidebar.min.js"></script>
    <script src="js/bootstrap-markdown.js"></script>
    
    <script>
    window.onload = function () {
        $("#plainText").markdown({
            autofocus: true,
            iconlibrary: 'fa',
            height: 'editor',
            'fullscreen': false,
			onPreview: function(e){
				alert(e.tagName);
			}
			/*
			additionalButtons:[
			[{
				name:"Save to Local",
				icon:"fa fa-bars",
				callback:function(e){
					var JSONStorage = require('node-localstorage').JSONStorage;
						var storageLocation = app.getPath('LocalBlogs');
						global.nodeStorage = new JSONStorage(storageLocation);
				}
			}]
			*/
        });

        $('#jsi-nav').sidebar({
            trigger: '.jsc-sidebar-trigger',
            scrollbarDisplay: true,
            pullCb: function() {
                console.log('pull');
            },
            pushCb: function() {
                console.log('push');
            }
       });


        function reset_size() {
            $('.md-editor').height($('.wrapper').height() - $('.top-nav').outerHeight());
            $('textarea').height($('.md-editor').height() - $('.md-header').outerHeight());  
        };
        reset_size();
        window.onresize = reset_size;
    }
    </script>
    
</body>

</html><commit_msg>canceled window onload<commit_after><!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>BLEXT editor</title>
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <link href="css/style.css" rel="stylesheet">
    <link href="css/index.css" rel="stylesheet">
    <link href="css/bootstrap-markdown.min.css" rel="stylesheet">
    <link href="css/sidebar.min.css" rel="stylesheet">

    <script src="https://use.fontawesome.com/ab291d07ba.js"></script>
</head>

<body>
    <div class="wrapper jsc-sidebar-content jsc-sidebar-pulled">
        <nav class="top-nav">
            <div>
                <i class="fa fa-bars jsc-sidebar-trigger link-menu" aria-hidden="true"></i>                
            </div>
        </nav>
        <textarea name="plainText" id="plainText"  placeholder="Write your Markdown content here" style="outline: none;"></textarea>
    </div>
    <nav class="sidebar jsc-sidebar" id="jsi-nav" data-sidebar-options="">
        <ul class="sidebar-list">
            <li><a href="#SignIn" data-toggle="collapse"  class="current">Sign In</a></li>
			<li>
				<form id="SignIn" " class="sidebar-collapse collapse" role="form" style="padding-left: 5px; padding-right:5px;">
					<div class="form-group">
						<label for="exampleInputEmail1">Email address</label>
						<input type="email" class="form-control" id="exampleInputEmail1" placeholder="Enter email">
					</div>
					<div class="form-group">
						<label for="exampleInputPassword1">Password</label>
						<input type="password" class="form-control" id="exampleInputPassword1" placeholder="Password">
					</div>
					<button type="button" class="btn btn-default"onclick="reqAuth()">提交</button>
					<script>
						/*function decoding(data){
							//enable to show data with selectedbyId blogList
							$(data).appendTo("#blogList");
							alert(JSON.stringify(data));
						}*/
						function reqAuth(){
							$.ajax({
								header:{
									'Authorization': 'Basic ' + btoa('<EMAIL>:cat')
								},
								url:"http://127.0.0.1/contactsList.html",
								datatype:'json',
								success:function(e,data){
									alert($("textarea#plainText").value.constructor.Name);
									$("textarea#plainText").fn.markdown.setContent(JSON.stringify(data));
									$(data).appendTo("#blogList");
									alert(JSON.stringify(data));
								}	
								})/*.done(function(data){
									$(data).appendTo("#blogList");
									alert(JSON.stringify(data));
								});	*/		
						}
						
					</script>
				</form>
			</li>
            <li><a href="#blogList" data-toggle="collapse" >View History</a></li>
			<li>
					<div href="#" id="blogList" class="sidebar-collapse collapse">
					<!--put the list of blogs here-->
					</div>
			</li>
            <li><a href="#" data-toggle="collapse" >Options</a></li>
        </ul>
    </nav>
    <script src="js/jquery.min.js"></script>
    <script src="js/bootstrap.min.js"></script>
    <script src="js/marked.min.js"></script>
    <script src="js/sidebar.min.js"></script>
    <script src="js/bootstrap-markdown.js"></script>
    
    <script>
    $("#plainText").markdown({
            autofocus: true,
            iconlibrary: 'fa',
            height: 'editor',
            'fullscreen': false,
			onPreview: function(e){
				alert(e.tagName);
			}
			/*
			additionalButtons:[
			[{
				name:"Save to Local",
				icon:"fa fa-bars",
				callback:function(e){
					var JSONStorage = require('node-localstorage').JSONStorage;
						var storageLocation = app.getPath('LocalBlogs');
						global.nodeStorage = new JSONStorage(storageLocation);
				}
			}]
			*/
        });

        $('#jsi-nav').sidebar({
            trigger: '.jsc-sidebar-trigger',
            scrollbarDisplay: true,
            pullCb: function() {
                console.log('pull');
            },
            pushCb: function() {
                console.log('push');
            }
       });


        function reset_size() {
            $('.md-editor').height($('.wrapper').height() - $('.top-nav').outerHeight());
            $('textarea').height($('.md-editor').height() - $('.md-header').outerHeight());  
        };
        reset_size();
        window.onresize = reset_size;
    </script>
    
</body>

</html>
{'fraction_non_alphanumeric': 0.18651026392961878, 'fraction_numerical': 0.004222873900293255, 'mean_word_length': 2.4771615008156607, 'pattern_counts': {'":': 0, '<': 161, '<?xml version=': 0, '>': 161, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '4345588', 'n_tokens_mistral': 3197, 'n_tokens_neox': 2573, 'n_words': 441}