PageSourceSearch

https://www.cdslindia.com/IncludesNew/js/common/script.js

js cdslindia.com collected 2026-10-01 12:03:26 UTC 15,908 bytes, 576 lines download raw bytes

1$(document).ready(function () {
2
3    var owl = $(".crousel-1");
4    var isPlaying = true;
5
6    owl.owlCarousel({
7        loop: false,
8        margin: 10,
9        touchDrag: false,
10        mouseDrag: false,
11        smartSpeed: 1000,
12        autoplay: false,
13        autoplayTimeout: 3000,
14        responsiveClass: true,
15        dots: false,
16        responsive: {
17            0: { items: 2 },
18            600: { items: 2, margin: 20 },
19            1000: { items: 5 }
20        }
21    });
22
23    $("#btn-play-pause-main-carousel").click(function () {
24        var icon = $(this).find("i");
25        if (isPlaying) {
26            owl.trigger("stop.owl.autoplay");
27            icon.removeClass("fa-pause-circle")
28                .addClass("fa-play-circle");
29        } else {
30            owl.trigger("play.owl.autoplay", [3000]);
31            icon.removeClass("fa-play-circle")
32                .addClass("fa-pause-circle");
33        }
34
35        isPlaying = !isPlaying;
36    });
37	const $carouselElements = $(".carousel-item");
38    if ($carouselElements && $carouselElements.length) {
39        for (let i = 0; i < $carouselElements.length; i++) {
40            let isActive = i === 0 ? "active" : "";
41            let ariaCurrent = i === 0 ? 'aria-current="true"' : "";
42
43            let carouselButton = `
44            <li role="presentation">
45                <button type="button"
46                        data-bs-target="#carouselExampleIndicators"
47                        data-bs-slide-to="${i}"
48                        class="${isActive}"
49                        ${ariaCurrent}
50                        role="tab"
51                        aria-label="Slide ${i + 1} of ${$carouselElements.length}"
52                        title="Go to slide ${i + 1} of ${$carouselElements.length}">
53                    <span class="visually-hidden">Slide ${i + 1}</span>
54                </button>
55            </li>
56        `;
57            $('.carousel-indicators').append(carouselButton);
58        }
59    }
60});
61
62jQuery(document).ready(function($) {
63  $("#newsTicker1").breakingNews();
64  //$('#newsTicker2').data('breakingNews').next();
65  $("#newsTicker2").breakingNews({
66    direction: "rtl"
67  });
68  $("#newsTicker3").breakingNews({
69    themeColor: "#f9a828",
70    effect: "slide-left"
71  });
72  $("#newsTicker4").breakingNews({
73    themeColor: "#11cbd7",
74    source: {
75      type: "rss",
76      usingApi: "rss2json",
77      rss2jsonApiKey: "5ivfzdrkuqwmoe0dgxeqvhfz0knlo7yq4fw20bt0",
78      url: "http://rss.cnn.com/rss/edition.rss",
79      limit: 7,
80      showingField: "title",
81      linkEnabled: true,
82      target: "_blank",
83      seperator:
84        '<span class="bn-seperator" style="background-image:url(img/cnn-logo.png);"></span>',
85      errorMsg: "RSS Feed not loaded. Please try again."
86    }
87  });
88  $("#newsTicker5").breakingNews({
89    effect: "typography"
90  });
91  $("#newsTicker6").breakingNews({
92    source: {
93      type: "json",
94      url: "https://jsonplaceholder.typicode.com/posts",
95      limit: 20,
96      showingField: "title",
97      linkEnabled: false,
98      target: "_blank",
99      seperator:
100        '<span class="bn-seperator" style="background-image:url(img/cnn-logo.png);"></span>',
101      errorMsg: "Json file not loaded. Please check the settings."
102    }
103  });
104  $("#newsTicker7").breakingNews({
105    themeColor: "#11cbd7",
106    background: "transparent",
107    borderWidth: 0,
108    source: {
109      type: "rss",
110      usingApi: "YQL",
111      url: "http://feeds.bbci.co.uk/news/rss.xml",
112      limit: 20,
113      showingField: "title",
114      linkEnabled: true,
115      target: "_blank",
116      seperator: '<span class="bn-seperator bn-news-dot"></span>',
117      errorMsg: "Json file not loaded. Please check the settings."
118    }
119  });
120  $("#newsTicker8").breakingNews({
121    height: 56,
122    borderWidth: 0,
123    background: "url(img/background-pattern-example.png)"
124  });
125  $("#newsTicker9").breakingNews({
126    effect: "fade",
127    themeColor: "#ef7b7b"
128  });
129  $("#newsTicker10").breakingNews({
130    effect: "slide-down",
131    themeColor: "#2eb872",
132    height: 50,
133    fontSize: "18px"
134  });
135  $("#newsTicker11").breakingNews({
136    effect: "slide-up"
137  });
138  $("#newsTicker12").breakingNews({
139    effect: "typography",
140    direction: "rtl",
141    themeColor: "#08c299"
142  });
143  $("#newsTicker13").breakingNews({
144    effect: "slide-right"
145  });
146  $("#newsTicker14").breakingNews();
147  $("#newsTicker15").breakingNews({
148    position: "fixed-bottom",
149    borderWidth: 3,
150    height: 50,
151    themeColor: "#ce2525"
152  });
153});
154
155$(document).ready(function() {
156  $(".award-crousel-carousel").owlCarousel({
157    loop: true,
158    margin: 30,
159    smartSpeed: 1000,
160    autoplayTimeout: 3000,
161    autoplayTimeout: 3000,
162    responsiveClass: true,
163    responsive: {
164      0: {
165        items: 1,
166        nav: true
167      },
168      600: {
169        items: 1,
170        nav: true
171      },
172      1000: {
173        items: 2,
174        nav: true
175      }
176    }
177  });
178});
179
180$(document).ready(function() {
181  $(".milestone-carousel2").owlCarousel({
182    loop: true,
183    margin: 10,
184    smartSpeed: 1000,
185    autoplayTimeout: 3000,
186    autoplayTimeout: 3000,
187    responsiveClass: true,
188    responsive: {
189      0: {
190        items: 1,
191        nav: true
192      },
193      600: {
194        items: 2,
195        nav: true
196      },
197      1000: {
198        items: 3,
199        nav: true
200      }
201    }
202  });
203});
204
205$(document).ready(function() {
206  $(".video-carousel").owlCarousel({
207    loop: true,
208    margin: 60,
209    smartSpeed: 1000,
210    autoplayTimeout: 3000,
211    autoplayTimeout: 3000,
212    responsiveClass: true,
213    responsive: {
214      0: {
215        items: 1,
216        nav: true
217      },
218      600: {
219        items: 2,
220        nav: true
221      },
222      1000: {
223        items: 3,
224        nav: true
225      }
226    }
227  });
228});
229
230$(document).ready(function() {
231  $("a[data-theme]").click(function() {
232    $("head link#theme").attr("href", $(this).data("theme"));
233    $(this)
234      .toggleClass("active")
235      .siblings()
236      .removeClass("active");
237  });
238  $("a[data-effect]").click(function() {
239    $("head link#effect").attr("href", $(this).data("effect"));
240    $(this)
241      .toggleClass("active")
242      .siblings()
243      .removeClass("active");
244  });
245});
246
247$("#hide").click(function() {
248  $("#p").hide();
249});
250$("#show").click(function() {
251  $("#p").show();
252});
253
254$(".btn-group, .dropdown").hover(
255  function() {
256    $(">.dropdown-menu", this)
257      .stop(true, true)
258      .fadeIn("slow");
259    $(this).addClass("open");
260  },
261  function() {
262    $(">.dropdown-menu", this)
263      .stop(true, true)
264      .fadeOut("slow");
265    $(this).removeClass("open");
266  }
267);
268
269$(".btn-group, .dropdown2").click(
270  function() {
271    $(">.dropdown-menu", this)
272      .stop(true, true)
273      .fadeIn("slow");
274    $(this).addClass("open");
275  },
276  function() {
277    $(">.dropdown-menu", this)
278      .stop(true, true)
279      .fadeOut("slow");
280    $(this).removeClass("open");
281  }
282);
283
284// scroller
285(function($) {
286  $(function() {
287    $("#scroller").simplyScroll();
288  });
289})(jQuery);
290// scroller
291
292
293$(".panel-collapse").on("show.bs.collapse", function() {
294  $(this)
295    .siblings(".panel-heading")
296    .addClass("active");
297});
298
299$(".panel-collapse").on("hide.bs.collapse", function() {
300  $(this)
301    .siblings(".panel-heading")
302    .removeClass("active");
303});
304
305
306var active_accordian = 0;
307function get_active_index() {
308  $('.panel-heading').each(function () {
309    if ($(this).hasClass('active')) {
310      active_accordian = $('.panel-heading').index($(this));
311    }
312  });
313}
314get_active_index();
315
316$(document).on('click', '.panel-heading', function () {
317  active_accordian = $('.panel-heading').index($(this));
318  var index = 0;
319  $('.panel-default').each(function () {
320    if (index != active_accordian) {
321      $(this).find('.panel-heading').removeClass('active');
322      $(this).find('.panel-collapse').removeClass('show');
323    }
324    index++;
325  });
326
327});
328
329
330
331  $(document).ready(function(){
332    $('.modal').on('hidden.bs.modal', function () {
333      $('.modal').each(function () {
334        $(this).find('iframe').attr('src', $(this).find('iframe').attr('src'));
335      });
336    });
337      });
338
339
340
341(function ($) {
342  $(window).on("load", function () {
343
344    $.mCustomScrollbar.defaults.scrollButtons.enable = true; //enable scrolling buttons by default
345    $.mCustomScrollbar.defaults.axis = "yx"; //enable 2 axis scrollbars by default
346
347    $("#content-l").mCustomScrollbar();
348
349    $("#content-dtk").mCustomScrollbar({ theme: "dark-thick" });
350    $("#content-dtk2").mCustomScrollbar({ theme: "dark-thick" });
351
352    $(".all-themes-switch a").click(function (e) {
353      e.preventDefault();
354      var $this = $(this),
355        rel = $this.attr("rel"),
356        el = $(".content3");
357      switch (rel) {
358        case "toggle-content":
359          el.toggleClass("expanded-content");
360          break;
361      }
362    });
363
364  });
365})(jQuery);
366
367function handleLoginSelect(url) {
368    const message = 'You are being redirected to a web application.\n\nDo you want to continue?';
369    if (window.confirm(message)) {
370        window.open(url, "_blank", "noopener,noreferrer");
371    }
372}
373
374$(document).ready(function () {
375    $("#HomeLoginbtn").click(function () {
376        var radioValue = $("input[name='customRadio']:checked").val();
377        if (radioValue == "Easicore") {
378            handleLoginSelect("https://web.cdslindia.com/myeasi/home/login");
379        }
380        if (radioValue == "Issuer") {
381            handleLoginSelect("https://issuercentre.cdslindia.com/Home/Login");
382        }
383
384        if (radioValue == "Cas") {
385            //window.open("https://test1.cdslindia.com/cas/logincas.aspx");
386            handleLoginSelect("https://www.cdslindia.com/CAS/LoginCAS.aspx");
387        }
388        if (radioValue == "Unlisted") {
389            handleLoginSelect("https://web.cdslindia.com/UnlistedIssuer");
390        }
391        if (radioValue == "RegisterTrn") {
392            handleLoginSelect("https://www.cdslindia.com/cpemain/cpe/cpelogin.aspx");
393        }
394        if (radioValue == "GenerateTpin") {
395            handleLoginSelect("https://edis.cdslindia.com/home/generatepin");
396        }
397        if (radioValue == "ChangeTpin") {
398            handleLoginSelect("https://edis.cdslindia.com/home/changepin");
399        }
400        if (radioValue == "Easicore3_1") {
401            handleLoginSelect("https://web.cdslindia.com/myeasinew/home/login");
402        }
403	    if (radioValue == "EasiIEPF") {
404            handleLoginSelect("https://web.cdslindia.com/myeasiiepf/home/login");
405        }
406        if (radioValue == "EasiToken") {
407            handleLoginSelect("https://web.cdslindia.com/myeasitoken/home/login");
408        }
409        if (radioValue == "CAFLogin") {
410            handleLoginSelect("https://www.cdslindia.com/CAF/CAF.html");
411        }
412        if (radioValue == "Form121Login") {
413            window.location.href = "https://www.cdslindia.com/eservices/Form121/Form121Login/Submission";
414        }
415    })
416
417    $(document).on('click', function (e) {
418        var p = e.target;
419        while (p) {
420            if (p.id) {
421                if (p.id == 'openmodalmsg') {
422                    return;
423                }
424            }
425            p = p.parentElement;
426        }
427        $("#homemodal").hide();
428
429    });
430
431    //$(".modalmsg").hover(function () {
432        //$('#homemodal').modal({
433            //show: true,
434            //backdrop: false
435        //});
436    //});
437
438});
439
440
441// Added for getting confirmation before redirecting on external link
442function handleExternalLinkClick(input) {
443    let url;
444
445    // Detect if input is an event or URL string
446    if (input && input.preventDefault) {
447        input.preventDefault();
448        const link = input.currentTarget || input.target;
449        url = link.href;
450    } else if (typeof input === 'string') {
451        url = input;
452    } else {
453        console.warn('handleExternalLinkClick: Invalid input', input);
454        return;
455    }
456
457    const parsedUrl = new URL(url, window.location.origin);
458    const linkHost = parsedUrl.hostname;
459    const currentHost = window.location.hostname;
460
461    const fileExtensions = [
462        'pdf', 'doc', 'docx', 'xls', 'xlsx',
463        'ppt', 'pptx', 'zip', 'rar', 'csv', 'txt'
464    ];
465
466    const pathname = parsedUrl.pathname.toLowerCase();
467    const isFile = fileExtensions.some(ext => pathname.endsWith('.' + ext));
468
469    // If it's a file always open in new tab
470    if (isFile) {
471        window.open(url, '_blank', 'noopener,noreferrer');
472        return;
473    }
474
475    // External link check
476    if (linkHost && linkHost !== currentHost) {
477        const message = 'You are being redirected to an external website.\n\nDo you want to continue?';
478        if (window.confirm(message)) {
479            window.open(url, '_blank', 'noopener,noreferrer');
480        }
481    } else {
482        window.location.href = url; // Internal link
483    }
484}
485
486$(document).ready(function () {
487    // Attach event listener separately
488    $('body').on('click', 'a[href]', handleExternalLinkClick);
489
490    // Add Role and alt text to banner available on page
491    $('#section1 img.img-fluid').attr({
492        alt: "",
493        role: 'presentation'
494    });
495
496    $('.breadcrumb img').attr({
497        alt: "",
498        role: 'presentation'
499    });
500
501    $('.breadcrumb li').removeAttr('aria-current');
502    $('.breadcrumb li:last').attr('aria-current', 'page');
503
504    var last = $('.breadcrumb li:last').text();
505
506    if (last) {
507        document.title = last + " | Central Depository Services (India) Limited";
508    } else {
509        document.title =  " Central Depository Services (India) Limited";
510    }
511
512    $('#chatbot-launcher').attr({
513        tabindex: 0,
514    });
515
516    const download_file_img_selectors = [
517        '.download_list li a img',
518        '.financial-statement a img',
519        '.cbrs-download a img',
520        '.cvl-download a img',
521        '.CIRL-download a img',
522        '.CCRL-download a img',
523        '.IFSC-download a img'
524    ];
525
526    $(download_file_img_selectors.join(', ')).attr('alt', 'Download file');
527
528    // CR-XXXX WACG 2.2 (A): 2.4.1
529    const updateDivs = $('.update');
530    const lastUpdateDiv = updateDivs[updateDivs.length - 1];
531    if (lastUpdateDiv) {
532        const button = document.createElement('button');
533        button.id = 'previous-page-button';
534        button.className = 'btn bg-transparent btn-link';
535        button.type = 'button';
536        button.textContent = 'Back to previous page';
537
538        button.addEventListener('click', () => {
539            if (document.referrer) {
540                window.history.back();
541            } else {
542                window.location.href = '/';
543            }
544        });
545
546        lastUpdateDiv.appendChild(button);
547    }
548
549    const el = document.querySelector('#carouselExampleIndicators');
550    const carousel = new bootstrap.Carousel(el, {
551        interval: 6000,
552        ride: false,
553        pause: false,
554        touch: false
555    });
556
557    const btn = document.getElementById('btn-play-pause-main-banner');
558    const icon = btn.querySelector('i');
559
560    let isPaused = false;
561
562    carousel.cycle();
563
564    btn.addEventListener('click', function () {
565        if (isPaused) {
566            carousel.cycle();
567            icon.classList.remove('fa-play-circle');
568            icon.classList.add('fa-pause-circle');
569        } else {
570            carousel.pause();
571            icon.classList.remove('fa-pause-circle');
572            icon.classList.add('fa-play-circle');
573        }
574        isPaused = !isPaused;
575    });
576});

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.