<commit_before><!--
 * =============================================================================
 *
 * ORCID (R) Open Source
 * http://orcid.org
 *
 * Copyright (c) 2012-2014 ORCID, Inc.
 * Licensed under an MIT-Style License (MIT)
 * http://orcid.org/open-source-license
 *
 * This copyright and license information (including a link to the full license)
 * shall be included in its entirety in all copies or substantial portion of
 * the software.
 *
 * =============================================================================
-->


<button id="connect-orcid-button" onclick="openImportWizardUrl(); return false;"><img id="orcid-id-logo" src="http://orcid.org/sites/default/files/images/orcid_16x16.png" width='16' height='16' alt="ORCID logo"/> Create or Connect your ORCID iD</button>

<script>

function openImportWizardUrl() {
	
	var url = 'https://sandbox.orcid.org/oauth/authorize?client_id=0000-0002-1223-3173&response_type=code&scope=%2Fauthenticate&redirect_uri=http%3A%2F%2Forcid.github.io%2Fexamples%2Foauth2%2Fredirect.html&show_login=true&state=TjtL8bFK5yEz0gFG'; 

    var win = window.open(url, "_target", "toolbar=no, scrollbars=yes, width=500, height=600, top=500, left=500");
    
    setTimeout( function() {
        if(!win || win.outerHeight === 0) {
            //First Checking Condition Works For IE & Firefox
            //Second Checking Condition Works For Chrome
            window.location.href = url;
        }
    }, 250);
};

</script><commit_msg>add comments<commit_after><!--
 * =============================================================================
 *
 * ORCID (R) Open Source
 * http://orcid.org
 *
 * Copyright (c) 2012-2014 ORCID, Inc.
 * Licensed under an MIT-Style License (MIT)
 * http://orcid.org/open-source-license
 *
 * This copyright and license information (including a link to the full license)
 * shall be included in its entirety in all copies or substantial portion of
 * the software.
 *
 * =============================================================================
-->

<html>

<!--
Example showing how to initiate ORCID OAuth2 process using a popup window with a fallback for cases where a popup blocker is enabled.
Tested in Firefox, Chrome, and IE11

For more guidelines on presenting the ORCID OAuth2 screen in your application, see https://members.orcid.org/api/presenting-oauth
-->


<!--prompt the user to create/connect an ORCID iD using a button or link-->
<button id="connect-orcid-button" onclick="openORCIDOauth(); return false;">
    <img id="orcid-id-logo" src="http://orcid.org/sites/default/files/images/orcid_16x16.png" width='16' height='16' alt="ORCID logo"/>
    Create or Connect your ORCID iD
</button>


<!--open the oauth2 screen in a popup if possible or open in same window if popup does not open-->
<script>

function openORCIDOauth() {

	//URL to get an oauth2 authorization code for the current user  - see param reference at http://members.orcid.org/api/get-oauthauthorize
    //local variable for demo purposes - your URL is likely defined elsewhere as a global
	var url = 'https://sandbox.orcid.org/oauth/authorize?client_id=0000-0002-1223-3173&response_type=code&scope=%2Fauthenticate&redirect_uri=http%3A%2F%2Forcid.github.io%2Fexamples%2Foauth2%2Fredirect.html&show_login=true&state=TjtL8bFK5yEz0gFG'; 

    //open the orcid oauth2 screen in a popup 
    var win = window.open(url, "_target", "toolbar=no, scrollbars=yes, width=500, height=600, top=500, left=500");

    //if popup takes too long to load, popup blocker likely enabled - load oauth screen in same window instead
    setTimeout( function() {
        if(!win || win.outerHeight === 0) {
            //first condition check works for IE & Firefox
            //second confition check works for Chrome
            window.location.href = url;
        }
    }, 250);
};

</script>
</html>
{'fraction_non_alphanumeric': 0.19419237749546278, 'fraction_numerical': 0.03240860772621208, 'mean_word_length': 4.13031914893617, 'pattern_counts': {'":': 0, '<': 20, '<?xml version=': 0, '>': 20, 'https://': 3, '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': '2247460', 'n_tokens_mistral': 1247, 'n_tokens_neox': 1121, 'n_words': 335}