var Incl = Backbone.View.extend({
    prefix: 'Incl',
    parentObj: null,

    events: {
    },

    prepareView: function (event) {

        if (Newst.checkMainNewsPpDisable !== undefined && !Newst.checkMainNewsPpDisable()) {
            let script = document.createElement('script');
            let head = document.getElementsByTagName('head')[0];
            script.type = 'text/javascript';
            script.src = '/js/view/split_' + $('#splitId').val() + '/mainNews.js?2';
            head.appendChild(script);
        }

        if (window.News !== undefined) {
            if (!Newst.checkSpecialDisable(this.parentObj.noExitScriptList)
                && !this.parentObj.noBlankList.includes(Number($('#sourceId').val()))) {

                let script = document.createElement('script');
                let head = document.getElementsByTagName('head')[0];
                script.type = 'text/javascript';
                script.src = '/js/view/split_' + $('#splitId').val() + '/exit.js?v=2&type=news';
                head.appendChild(script);
            }

            if (!Newst.checkSpecialDisable(this.parentObj.noReturnScriptList)) {
                let script = document.createElement('script');
                let head = document.getElementsByTagName('head')[0];
                script.type = 'text/javascript';
                script.src = '/js/view/split_' + $('#splitId').val() + '/pop.js?v=2&type=news';
                head.appendChild(script);
            }
        } else if (window.Preview !== undefined) {
            if (!Newst.checkSpecialDisable(this.parentObj.noExitScriptList)
                && !this.parentObj.noBlankList.includes(Number($('#sourceId').val()))) {

                let script = document.createElement('script');
                let head = document.getElementsByTagName('head')[0];
                script.type = 'text/javascript';
                script.src = '/js/view/split_' + $('#splitId').val() + '/exit.js?v=2&type=preview';
                head.appendChild(script);
            }

            if (!Newst.checkSpecialDisable(this.parentObj.noReturnScriptList)) {
                let script = document.createElement('script');
                let head = document.getElementsByTagName('head')[0];
                script.type = 'text/javascript';
                script.src = '/js/view/split_' + $('#splitId').val() + '/pop.js?v=2&type=preview';
                head.appendChild(script);
            }
        }
    },

    render: function (parentObj) {
        this.parentObj = parentObj;
        this.setElement($('body').get(0));
        this.prepareView();
        return this;
    }
});