<commit_before>///<reference path='refs.ts'/>

module TDev.RT.Cordova
{
    export function setup(deviceready:()=>void)
    {
        document.addEventListener("deviceready", () => deviceready(), false)
        document.addEventListener("backbutton",() => {
            if (!TDev.Runtime.theRuntime ||
                TDev.Runtime.theRuntime.getPageCount() == 1)
                (<any>navigator).app.exitApp();
            else
                Util.goBack();
        }, false);
    }
}
<commit_msg>cordova fix for wp back button issue<commit_after>///<reference path='refs.ts'/>
var WinJS: any;

module TDev.RT.Cordova
{
    export function setup(deviceready:()=>void)
    {
        document.addEventListener("deviceready", () => deviceready(), false)
        document.addEventListener("backbutton",() => {
            if (!TDev.Runtime.theRuntime ||
                TDev.Runtime.theRuntime.getPageCount() == 1)
                (<any>navigator).app.exitApp();
            else
                Util.goBack();
        }, false);
        
        document.addEventListener('deviceready', () => {
            if(WinJS){
                WinJS.Application.onbackclick = function (e) {
                    if (!TDev.Runtime.theRuntime || TDev.Runtime.theRuntime.getPageCount() == 1)
                        return false;
                    else
                        TDev.Util.goBack();
                    return true; }
            }
        }, false);
    }
}

{'fraction_non_alphanumeric': 0.14256339958875944, 'fraction_numerical': 0.00205620287868403, 'mean_word_length': 1.7495291902071564, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 14, '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': '4784660', 'n_tokens_mistral': 420, 'n_tokens_neox': 386, 'n_words': 63}