<commit_before>'use strict';

(function (angular, buildfire) {
    angular.module('socialPluginWidget', ['ngRoute', 'infinite-scroll', 'ngAnimate', 'socialModals', 'ngFileUpload', 'socialPluginFilters'])
        .config(['$routeProvider', '$compileProvider', '$httpProvider', function ($routeProvider, $compileProvider, $httpProvider) {

            /**
             * To make href urls safe on mobile
             */
            $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|ftp|mailto|chrome-extension|cdvfile|file):/);


            /**
             *To disable pull down to refresh functionality
             * */

//            buildfire.datastore.disableRefresh();

            $routeProvider
                .when('/', {
                    template: '<div></div>'
                })
                .when('/thread/:threadId', {
                    templateUrl: 'templates/thread.html',
                    controllerAs: 'Thread',
                    controller: 'ThreadCtrl'
                })
                .otherwise('/');

            var interceptor = ['$q', function ($q) {
                var counter = 0;

                function increaseCounter() {
                    counter = counter + 1;
                }

                function decreaseCounter() {
                    counter = Math.max(counter - 1, 0);
                }

                function toggleSpinner() {
                    if (counter > 0)
                        buildfire.spinner.show();
                    else {
                        buildfire.spinner.hide();
                    }
                }

                return {

                    request: function (config) {
                        console.log('config-------------------------', config, config.url.indexOf('threadLikes'));
                        if (config.url.indexOf('threadLikes') == -1) {
                            increaseCounter();<commit_msg>Removed spinner for imageUpload and post/comment create<commit_after>'use strict';

(function (angular, buildfire) {
    angular.module('socialPluginWidget', ['ngRoute', 'infinite-scroll', 'ngAnimate', 'socialModals', 'ngFileUpload', 'socialPluginFilters'])
        .config(['$routeProvider', '$compileProvider', '$httpProvider', function ($routeProvider, $compileProvider, $httpProvider) {

            /**
             * To make href urls safe on mobile
             */
            $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|ftp|mailto|chrome-extension|cdvfile|file):/);


            /**
             *To disable pull down to refresh functionality
             * */

//            buildfire.datastore.disableRefresh();

            $routeProvider
                .when('/', {
                    template: '<div></div>'
                })
                .when('/thread/:threadId', {
                    templateUrl: 'templates/thread.html',
                    controllerAs: 'Thread',
                    controller: 'ThreadCtrl'
                })
                .otherwise('/');

            var interceptor = ['$q', function ($q) {
                var counter = 0;

                function increaseCounter() {
                    counter = counter + 1;
                }

                function decreaseCounter() {
                    counter = Math.max(counter - 1, 0);
                }

                function toggleSpinner() {
                    if (counter > 0)
                        buildfire.spinner.show();
                    else {
                        buildfire.spinner.hide();
                    }
                }

                return {

                    request: function (config) {
                        console.log('config-------------------------', config, config.url.indexOf('threadLikes'));
                        if (config.url.indexOf('threadLikes') == -1 && config.url.indexOf('thread/add') == -1 && config.url.indexOf('Image/upload') == -1) {
                            increaseCounter();
{'fraction_non_alphanumeric': 0.13529116465863453, 'fraction_numerical': 0.0035140562248995983, 'mean_word_length': 1.2876004592422503, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, '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': '5953190', 'n_tokens_mistral': 970, 'n_tokens_neox': 885, 'n_words': 179}