<commit_before><!DOCTYPE html>
<html lang="en" ng-app="VotingApp" ng-controller="publicpollController">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title ng-bind="poll.description">Voting App</title>

    <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="<KEY>" crossorigin="anonymous">
    <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">
    <link href="/public/css/main.css" rel="stylesheet" type="text/css">

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>
<body>

<!-- Bootstrap Modals Start -->
<div id="informationModal" class="modal fade" tabindex="-1" role="dialog">
	<div class="modal-dialog" role="document">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
				<h4 class="modal-title">Submit Vote</h4>
			</div>
			<div class="modal-body">
				<p class="text-info">{{modal.message}}</p>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default center-block" data-dismiss="modal">OK</button>
			</div>
		</div>
	</div>
</div>

<div id="warningModal" class="modal fade" tabindex="-1" role="dialog">
	<div class="modal-dialog" role="document">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
				<h4 class="modal-title">Submit Vote</h4>
			</div>
			<div class="modal-body">
				<p class="text-warning">{{modal.message}}</p>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default center-block" data-dismiss="modal">OK</button>
			</div>
		</div>
	</div>
</div>

<div id="successModal" class="modal fade" tabindex="-1" role="dialog">
	<div class="modal-dialog" role="document">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
				<h4 class="modal-title">Submit Vote</h4>
			</div>
			<div class="modal-body">
				<p>Vote success!</p>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-primary center-block" data-dismiss="modal">Click to refresh the page</button>
			</div>
		</div>
	</div>
</div>
<!-- Bootstrap Modals End -->
	
<!-- Navbar -->
<nav class="navbar navbar-default navbar-static-top">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="/">Voting App</a>
        </div>
        
        <div id="navbar" class="navbar-collapse collapse">
            <!-- Navbar unauthorized -->
            <ul id="unauthorized-navbar" class="nav navbar-nav navbar-right hide">
                <li><a href="/">Home</a></li>
                <li><a href="/auth/facebook">Sign in with Facebook</a></li>
            </ul>
            
            <!-- Navbar authorized -->
            <ul id="authorized-navbar" class="nav navbar-nav navbar-right hide">
                <li><a href="/">Home</a></li>
                <li><a href="/mypolls">My Polls</a></li>
                <li><a href="/logout">Sign out</a></li>
            </ul>
        </div>
    </div>
</nav>

<div class="container">
    <div class="jumbotron">
        <h2>
            <span ng-if="loader.isLoadingData">Loading data <i class="fa fa-spinner fa-spin"></i></span>
            <span ng-if="!loader.isLoadingData" ng-cloak>{{poll.description}}</span>
        </h2>
        <h4 class="text-warning" ng-if="voteObject && isUserLoggedIn" ng-cloak>You voted "{{poll.options[voteObject.vote].name}}".</h4>
        <h4 class="text-warning" ng-if="voteObject && !isUserLoggedIn" ng-cloak>Your public IP voted "{{poll.options[voteObject.vote].name}}".</h4>
    </div>
</div>

<div class="container">
    <div class="viewpoll hidden">
        <div class="row">
            <div class="col-md-6 col-xs-12 viewpoll-form">
                <form ng-submit="submitVote()">
                    <div class="form-group">
                        <label>Choose one from the options given:</label>
                        <select ng-disabled="loader.isSubmitting" ng-model="selectedOption" required class="form-control">
                            <option ng-if="!selectedOption" value="" disabled selected>-- Select one --</option>
                            <option ng-repeat="data in poll.options track by $index" value="{{$index}}">{{data.name}}</option>
                            <option ng-if="isUserLoggedIn" value="other-select-option">Other</option>
                        </select>
                    </div>
                    
                    <div ng-if="selectedOption == 'other-select-option'" class="form-group">
                        <label>Other option:</label>
                        <input id="newoption" ng-disabled="loader.isSubmitting" required type="text" class="form-control" placeholder="What is your new option?">
                    </div>
                    
                    <div class="row">
                        <div class="col-xs-12" ng-class="{ 'col-md-6': isUserLoggedIn }">
                            <button type="submit" ng-disabled="loader.isSubmitting" class="btn btn-success submit-btn">
                                <span ng-if="!loader.isSubmitting">Submit Vote</span>
                                <span ng-if="loader.isSubmitting">Please wait <i class="fa fa-spinner fa-spin"></i></span>
                            </button>    
                        </div>
                        <div ng-if="isUserLoggedIn" class="col-md-6 col-xs-12">
                            <button type="button" ng-click="sharePoll()" ng-disabled="loader.isSharing" class="btn btn-primary share-btn">
                                <span ng-if="!loader.isSharing">Share on Facebook</span>
                                <span ng-if="loader.isSharing">Please wait <i class="fa fa-spinner fa-spin"></i></span>
                            </button>
                        </div>
                    </div>
                </form>
            </div>
            
            <div class="col-md-6 col-xs-12 chart">
                <canvas id="myChart"></canvas>
            </div>
        </div>
    </div>
</div>

<!-- Bootstrap & JQuery -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="<KEY>" crossorigin="anonymous"></script>

<!-- Angular -->
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.0-rc.2/angular.min.js"></script>
<script type="text/javascript" src="https://code.angularjs.org/1.6.0-rc.2/angular-resource.min.js"></script>

<!-- ChartJS-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.4.0/Chart.min.js"></script>

<!-- Controllers -->
<script type="text/javascript" src="../controllers/publicpollController.client.js"></script>
</body>
</html><commit_msg>Share modal on facebook fix 2<commit_after><!DOCTYPE html>
<html lang="en" ng-app="VotingApp" ng-controller="publicpollController">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title ng-bind="poll.description">Voting App</title>

    <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="<KEY>" crossorigin="anonymous">
    <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">
    <link href="/public/css/main.css" rel="stylesheet" type="text/css">

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>
<body>

<!-- Bootstrap Modals Start -->
<div id="informationModal" class="modal fade" tabindex="-1" role="dialog">
	<div class="modal-dialog" role="document">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
				<h4 class="modal-title">Submit Vote</h4>
			</div>
			<div class="modal-body">
				<p class="text-success">{{modal.message}}</p>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default center-block" data-dismiss="modal">OK</button>
			</div>
		</div>
	</div>
</div>

<div id="warningModal" class="modal fade" tabindex="-1" role="dialog">
	<div class="modal-dialog" role="document">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
				<h4 class="modal-title">Submit Vote</h4>
			</div>
			<div class="modal-body">
				<p class="text-warning">{{modal.message}}</p>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default center-block" data-dismiss="modal">OK</button>
			</div>
		</div>
	</div>
</div>

<div id="successModal" class="modal fade" tabindex="-1" role="dialog">
	<div class="modal-dialog" role="document">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
				<h4 class="modal-title">Submit Vote</h4>
			</div>
			<div class="modal-body">
				<p>Vote success!</p>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-primary center-block" data-dismiss="modal">Click to refresh the page</button>
			</div>
		</div>
	</div>
</div>
<!-- Bootstrap Modals End -->
	
<!-- Navbar -->
<nav class="navbar navbar-default navbar-static-top">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="/">Voting App</a>
        </div>
        
        <div id="navbar" class="navbar-collapse collapse">
            <!-- Navbar unauthorized -->
            <ul id="unauthorized-navbar" class="nav navbar-nav navbar-right hide">
                <li><a href="/">Home</a></li>
                <li><a href="/auth/facebook">Sign in with Facebook</a></li>
            </ul>
            
            <!-- Navbar authorized -->
            <ul id="authorized-navbar" class="nav navbar-nav navbar-right hide">
                <li><a href="/">Home</a></li>
                <li><a href="/mypolls">My Polls</a></li>
                <li><a href="/logout">Sign out</a></li>
            </ul>
        </div>
    </div>
</nav>

<div class="container">
    <div class="jumbotron">
        <h2>
            <span ng-if="loader.isLoadingData">Loading data <i class="fa fa-spinner fa-spin"></i></span>
            <span ng-if="!loader.isLoadingData" ng-cloak>{{poll.description}}</span>
        </h2>
        <h4 class="text-warning" ng-if="voteObject && isUserLoggedIn" ng-cloak>You voted "{{poll.options[voteObject.vote].name}}".</h4>
        <h4 class="text-warning" ng-if="voteObject && !isUserLoggedIn" ng-cloak>Your public IP voted "{{poll.options[voteObject.vote].name}}".</h4>
    </div>
</div>

<div class="container">
    <div class="viewpoll hidden">
        <div class="row">
            <div class="col-md-6 col-xs-12 viewpoll-form">
                <form ng-submit="submitVote()">
                    <div class="form-group">
                        <label>Choose one from the options given:</label>
                        <select ng-disabled="loader.isSubmitting" ng-model="selectedOption" required class="form-control">
                            <option ng-if="!selectedOption" value="" disabled selected>-- Select one --</option>
                            <option ng-repeat="data in poll.options track by $index" value="{{$index}}">{{data.name}}</option>
                            <option ng-if="isUserLoggedIn" value="other-select-option">Other</option>
                        </select>
                    </div>
                    
                    <div ng-if="selectedOption == 'other-select-option'" class="form-group">
                        <label>Other option:</label>
                        <input id="newoption" ng-disabled="loader.isSubmitting" required type="text" class="form-control" placeholder="What is your new option?">
                    </div>
                    
                    <div class="row">
                        <div class="col-xs-12" ng-class="{ 'col-md-6': isUserLoggedIn }">
                            <button type="submit" ng-disabled="loader.isSubmitting" class="btn btn-success submit-btn">
                                <span ng-if="!loader.isSubmitting">Submit Vote</span>
                                <span ng-if="loader.isSubmitting">Please wait <i class="fa fa-spinner fa-spin"></i></span>
                            </button>    
                        </div>
                        <div ng-if="isUserLoggedIn" class="col-md-6 col-xs-12">
                            <button type="button" ng-click="sharePoll()" ng-disabled="loader.isSharing" class="btn btn-primary share-btn">
                                <span ng-if="!loader.isSharing">Share on Facebook</span>
                                <span ng-if="loader.isSharing">Please wait <i class="fa fa-spinner fa-spin"></i></span>
                            </button>
                        </div>
                    </div>
                </form>
            </div>
            
            <div class="col-md-6 col-xs-12 chart">
                <canvas id="myChart"></canvas>
            </div>
        </div>
    </div>
</div>

<!-- Bootstrap & JQuery -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="<KEY>" crossorigin="anonymous"></script>

<!-- Angular -->
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.0-rc.2/angular.min.js"></script>
<script type="text/javascript" src="https://code.angularjs.org/1.6.0-rc.2/angular-resource.min.js"></script>

<!-- ChartJS-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.4.0/Chart.min.js"></script>

<!-- Controllers -->
<script type="text/javascript" src="../controllers/publicpollController.client.js"></script>
</body>
</html>
{'fraction_non_alphanumeric': 0.18857107247460583, 'fraction_numerical': 0.008163519660995825, 'mean_word_length': 2.436402569593148, 'pattern_counts': {'":': 0, '<': 453, '<?xml version=': 0, '>': 453, 'https://': 18, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5735896', 'n_tokens_mistral': 5221, 'n_tokens_neox': 4846, 'n_words': 912}