PageSourceSearch

https://somoscooperativismo-ba.coop.br/assets/js/cncoop.js

js somoscooperativismo-ba.coop.br collected 2026-10-08 11:00:27 UTC 8,550 bytes, 186 lines download raw bytes

1$ = jQuery.noConflict();
2$(document).ready(function () {
3    var url = $(location).attr("href");
4    var splitUrl = url.split("/").reverse();
5
6    if ((splitUrl[0] === "cncoop" || splitUrl[0] === "sindicato") && splitUrl[1] === "institucional") {
7        aplicandoCss();
8        removendoElementosDesnecessarios();
9        adicionandoClassesControle();
10        gerarTagDestaque();
11        reposicionarItensMeta();
12        limitarInfoWrap();
13        adicionarSetaQuemEQuem();
14        incluirSetas();
15        movimentoPassos();
16        controlsDirectionSlideVideos();
17        escholherVideo();
18        alterarIframe();
19
20        function aplicandoCss() {
21            var protocolo = window.location.protocol;
22            var host = window.location.host;
23
24            var linkCss = protocolo + "//" + host + "/assets/css/cncoop.css";
25            $("head").append("<link rel='stylesheet' type='text/css' href='" + linkCss + "'>");
26
27            var linkCss = protocolo + '//' + host + '/assets/css/noticias-cncoop.css';
28            $('head').append('<link rel="stylesheet" type="text/css" href="' + linkCss + '">');
29
30            $(".content-relational .content-relational-col3 .sppb-addon-articles .sppb-addon-article").each(function (index) {
31                if (index === 0) {
32                    $(this).addClass("relacional-linha");
33                }
34            });
35
36            var linkCss = protocolo + '//' + host + '/assets/css/noticias-relacionadas.css';
37            $('head').append('<link rel="stylesheet" type="text/css" href="' + linkCss + '">');
38        }
39
40        function removendoElementosDesnecessarios() {
41            $("#t4-masthead").remove();
42            $(".page-header").remove();
43            $(".article-aside").remove();
44            $(".jllikeproSharesContayner").hide();
45            $(".pagenavigation").remove();
46            $(".box-breadcrumbs").remove();
47            $(".fields-container").remove();
48        }
49
50        function adicionandoClassesControle() {
51            $("#t4-header").addClass('header-cncoop');
52            $("#t4-main-body").addClass('body-cncoop');
53            $(".t4-content").addClass('content-cncoop');
54        }
55
56        function gerarTagDestaque() {
57            $('.destaque').before('<div class="tag-destaque">Destaque</div>');
58        }
59
60        function reposicionarItensMeta() {
61            var dataPublicacao = $('.sppb-article-meta').children()[0];
62            var categoriaArtigo = $('.sppb-article-meta').children()[1];
63            $('.sppb-article-meta').children().remove();
64            $('.sppb-article-meta').append(categoriaArtigo, dataPublicacao);
65        }
66
67        function limitarInfoWrap() {
68            $('.sppb-article-info-wrap')
69                .children('h3')
70                .children('a').each(function (key, data) {
71            });
72        }
73
74        function adicionarSetaQuemEQuem() {
75            $('.sppb-nav-modern li.active').append('<div class="seta-quem-e-quem"></div>');
76            $('.sppb-nav-modern li').click(function () {
77                $('.seta-quem-e-quem').remove();
78                $(this).append('<div class="seta-quem-e-quem"></div>');
79            })
80        }
81
82        function incluirSetas() {
83
84            $('.box-quem-e-quem .sppb-addon-content')
85                .first()
86                .prepend('<div class="controles-aba"></div>')
87
88            $('.controles-aba').append('<div class="prev"><svg id="Grupo_2994" data-name="Grupo 2994" xmlns="http://www.w3.org/2000/svg" width="35.789" height="35.789" viewBox="0 0 35.789 35.789"> < path id = "Caminho_26899" data-name="Caminho 26899" d = "M17.9.4A17.495,17.495,0,1,0,35.39,17.894,17.5,17.5,0,0,0,17.9.4" fill = "none" /> <circle id="Elipse_215" data-name="Elipse 215" cx="17.495" cy="17.495" r="17.495" transform="translate(0.4 0.399)" fill="none" stroke="#5080b9" stroke-linecap="round" stroke-miterlimit="10" stroke-width="0.799"/> <path id="Caminho_26900" data-name="Caminho 26900" d="M21.937,8.343l-9.551,9.551,9.551,9.551" fill="none" stroke="#5080b9" stroke-linecap="round" stroke-miterlimit="10" stroke-width="0.799"/> </svg ><div>');
89            $('.controles-aba').append('<div class="next"><svg xmlns="http://www.w3.org/2000/svg" width="35.789" height="35.789" viewBox="0 0 35.789 35.789"><g id="Grupo_2995" data-name="Grupo 2995" transform="translate(-1151.063 -2928.999)">
89 <path id="Caminho_26901" data-name="Caminho 26901" d="M70.927.4a17.495,17.495,0,1,1-17.5,17.495A17.5,17.5,0,0,1,70.927.4" transform="translate(1098.029 2929)" fill="none"/> <circle id="Elipse_216" data-name="Elipse 216" cx="17.495" cy="17.495" r="17.495" transform="translate(1151.462 2929.398)" fill="none" stroke="#5080b9" stroke-linecap="round" stroke-miterlimit="10" stroke-width="0.799"/> <path id="Caminho_26902" data-name="Caminho 26902" d="M66.886,8.343l9.551,9.551-9.551,9.551" transform="translate(1098.029 2929)" fill="none" stroke="#5080b9" stroke-linecap="round" stroke-miterlimit="10" stroke-width="0.799"/></g></svg> <div>')
90        }
91
92        function movimentoPassos() {
93            $('.controles-aba .next').click(function () {
94                $('.box-quem-e-quem li.active').next('li').find('a').first().click();
95                var distancia = $('.box-quem-e-quem ul').css('margin-left');
96                distancia = parseInt(distancia) + -145;
97                $('.box-quem-e-quem ul').css({'margin-left': distancia + 'px'});
98            });
99
100            $('.controles-aba .prev').click(function () {
101                $('.box-quem-e-quem li.active').prev('li').find('a').first().click();
102                var distancia = $('.box-quem-e-quem ul').css('margin-left');
103                distancia = parseInt(distancia) + 145;
104                $('.box-quem-e-quem ul').css({'margin-left': distancia + 'px'});
105            });
106        }
107
108        function controlsDirectionSlideVideos() {
109            var prev = 1;
110            var next = 3;
111
112            var quantidadeItens = $('.video-slide').find('.video-lista').find('.video-thumb').length;
113
114            for (var i = (next + 1); i <= quantidadeItens; i++) {
115                $("#video-" + i).addClass('hidden');
116            }
117
118            $('.prev').click(function () {
119                prev -= 1;
120                next -= 1;
121
122                if (prev <= 1) {
123                    prev = 1;
124                    next = 3;
125                    controlsDirectionSlideVideos();
126                }
127
128                var nextToChange = prev + 3;
129                var nextToChange1 = nextToChange - 3;
130                $("#video-" + nextToChange).addClass('hidden');
131                $("#video-" + nextToChange1).removeClass('hidden');
132            });
133
134            $('.next').click(function () {
135                prev += 1;
136                next += 1;
137
138                if (next >= quantidadeItens) {
139                    prev = quantidadeItens - 2;
140                    next = quantidadeItens;
141                }
142
143                var nextToChange = next - 3;
144                var nextToChange1 = nextToChange + 3;
145                $("#video-" + nextToChange).addClass('hidden');
146                $("#video-" + nextToChange1).removeClass('hidden');
147            });
148        }
149
150        function escholherVideo() {
151            $('.video-lista').find('.video-thumb').click(function () {
152                var linkVideo = $(this).attr('value');
153                console.log('https://www.youtube.com/embed/' + linkVideo);
154                $('.video-slide').children('.player').children('iframe').attr('src', 'https://www.youtube.com/embed/' + linkVideo)
155            });
156        }
157
158        function verificarZoomTela() {
159            var browserZoom = Math.round(window.devicePixelRatio * 100);
160            return browserZoom;
161        }
162
163        function alterarIframe() {
164            var zoomTela = verificarZoomTela();
165
166            if (zoomTela >= 150) {
167                var width = $('.video-slide').find('iframe').attr('width');
168                var widthCalc = width - (width * 0.58)
169                $('.video-slide').find('iframe').attr('width', widthCalc);
170                $('.video-slide').find('iframe').attr('height', 'auto');
171
172            } else {
173
174                $('.video-slide').find('iframe').attr('width', 750);
175                $('.video-slide').find('iframe').attr('height', 446);
176            }
177        }
178    }
179
180    $('.videoSecundario').click(function () {
181        var idVideo = $(this).attr('src').split('vi/')[1].split('/')[0];
182        var src = 'https://www.youtube.com/embed/' + idVideo;
183
184        $('.videoPrincipal').children('iframe').attr('src', src);
185    });
186});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.