<commit_before><html>
<head>
</head>
<body>
<h1>tab tweet</h1>

<input id="sign_in" type="submit" value="Sign into Twitter" />
<span id="work" style="display:none;">Working...</span>
<span style="display:none;">
    <input id="pin" type="text" />
    <input id="pin_submit" type="submit" value="Submit your 7-digit PIN from Twitter" />
</span>
<script src="jquery.js"></script>
<script src="oauth.js"></script>
<script src="sha1.js"></script>
<script type="text/javascript">
    $("#sign_in").click(function(e) {
        // XXX hide sign in input
        // XXX start animation
        // request twitter auth token
        //////////////////////////////
        var request_token_url = 'http://twitter.com/oauth/request_token';
        var accessor = {
            //token: "...",
            //tokenSecret: "...",
            consumerKey:    '<KEY>',
            consumerSecret: '<KEY>'
        };

        var message = {
            action: request_token_url,
            method: "GET",
            parameters: {}
        };

        OAuth.completeRequest(message, accessor);
        OAuth.SignatureMethod.sign(message, accessor);
        request_token_url = request_token_url + '?' + OAuth.formEncode(message.parameters);
        /////////////////////
        $.get(request_token_url, function(data) {
            alert(data);
            // XXX create tab
            // XXX go to oauth/authorize at twitter in tab
            // XXX show PIN input
            // XXX call oauth/access_token with PIN
            // XXX get access token; store in a background? local storage? they don't expire, so localstorage may be good.
        });

    });
</script>
</body>
</html>
<commit_msg>code re-arrange<commit_after><html>
<head>
</head>
<body>
<script src="jquery.js"></script>
<script src="oauth.js"></script>
<script src="sha1.js"></script>
<script type="text/javascript">
$(function() {
    $("#sign_in").click(function(e) {
        // XXX hide sign in input
        // XXX start animation
        // request twitter auth token
        var request_token_url = 'http://twitter.com/oauth/request_token';
        var accessor = {
            //token: "...",
            //tokenSecret: "...",
            consumerKey:    'ruXg6gDIBxihEyMd9jCHdQ',
            consumerSecret: '<KEY>'
        };

        var message = {
            action: request_token_url,
            method: "GET",
            parameters: {}
        };

        OAuth.completeRequest(message, accessor);
        OAuth.SignatureMethod.sign(message, accessor);
        request_token_url = request_token_url + '?' + OAuth.formEncode(message.parameters);

        $.get(request_token_url, function(data) {
            alert(data);
            // XXX create tab
            // XXX go to oauth/authorize at twitter in tab
            // XXX show PIN input
            // XXX call oauth/access_token with PIN
            // XXX get access token; store in local storage?
        });

    });
});    
</script>
<h1>tab tweet</h1>

<input id="sign_in" type="submit" value="Sign into Twitter" />
<span id="work" style="display:none;">Working...</span>
<span style="display:none;">
    <input id="pin" type="text" />
    <input id="pin_submit" type="submit" value="Submit your 7-digit PIN from Twitter" />
</span>
</body>
</html>

{'fraction_non_alphanumeric': 0.16717325227963525, 'fraction_numerical': 0.00303951367781155, 'mean_word_length': 2.1135288552507094, 'pattern_counts': {'":': 0, '<': 52, '<?xml version=': 0, '>': 52, 'https://': 0, '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': '282510', 'n_tokens_mistral': 982, 'n_tokens_neox': 956, 'n_words': 232}