PageSourceSearch

https://www.cruciblesnooker.com/dist/js/all.js?1779090042

js cruciblesnooker.com collected 2026-10-02 06:57:40 UTC 3,690 bytes, 108 lines download raw bytes

1var SNOOKER = {
2  spektrixURL: 'https://tickets.cruciblesnooker.com/' + $('meta[name=spektrix-client-name]').attr('content')
3};
4SNOOKER.layout = {
5  init: function () {
6    SNOOKER.layout.animation();
7    SNOOKER.layout.finalSessionIndicator();
8    SNOOKER.layout.roundFix();
9  },
10  roundFix: function () {
11    var title = $(".events-table-title.events-table-title-second-round");
12    var table = $(title).next('table');
13
14    if ($(table).find('*[data-round="round-one"]').length) {
15      $(title).next('table').clone().insertBefore($(title));
16      var newTable = $(title).prev('table');
17      $(newTable).removeClass("events-table-second-round");
18      $(newTable).addClass("events-table-first-round");
19      $(newTable).find('tr[data-round="round-two"]').remove();
20      $(newTable).find('.td-big-date').remove();
21      $(newTable).find('tr:first-child').prepend();
22      $(table).find('.td-big-date').clone().prependTo($(newTable).find('tr:first-child'));
23      $(table).find('tr[data-round="round-one"]').remove();
24    }
25  },
26  animation: function () {
27    $('.navigation a[href^="#"]').on('click', function (e) {
28      e.preventDefault();
29      var target = this.hash,
30          $target = $(target);
31      var distanceBetween = $target.offset().top - $(document).scrollTop();
32      var animationLength = Math.abs(distanceBetween * 0.2);
33      $('html, body').stop().animate({
34        'scrollTop': $target.offset().top
35      }, animationLength, 'swing', function () {
36        window.location.hash = target;
37      });
38    });
39  },
40  finalSessionIndicator: function () {
41    $('.column-title a').each(function () {
42      var linkText = $(this).text();
43
44      if (linkText.indexOf('*') != -1) {
45        linkText = linkText.replace("*", "");
46        $(this).text(linkText);
47        $(this).addClass('final-session');
48        $(this).append('<span class="final-session-indicator">Final session</span>');
49      }
50    });
51  }
52};
53SNOOKER.iframe = {
54  init: function () {
55    SNOOKER.iframe.loadIframe();
56    SNOOKER.iframe.keepAlive();
57  },
58  getParameterByName: function (name) {
59    name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
60    var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
61        results = regex.exec(location.search);
62    return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
63  },
64  getIframeURL: function (load) {
65    switch (load) {
66      case 'account':
67        return SNOOKER.spektrixURL + '/website/secure/MyAccount.aspx?resize=true';
68        break;
69
70      case 'basket':
71        return SNOOKER.spektrixURL + '/website/Basket2.aspx?resize=true';
72        break;
73
74      case 'book-seats':
75        return SNOOKER.spektrixURL + '/website/ChooseSeats.aspx?resize=true&EventInstanceId=' + SNOOKER.iframe.getParameterByName('id');
76        break;
77
78      case 'checkout':
79        return SNOOKER.spektrixURL + '/website/secure/Checkout.aspx?resize=true';
80        break;
81
82      default:
83        return '';
84        break;
85    }
86  },
87  loadIframe: function () {
88    $("#spektrix-resize").attr('src', SNOOKER.spektrixURL + "/website/scripts/resizeiframe.js");
89    pageToLoad = SNOOKER.iframe.getParameterByName('load');
90
91    if ($('.page-iframe') && typeof pageToLoad != 'undefined') {
92      $('#SpektrixIFrame').attr('src', SNOOKER.iframe.getIframeURL(pageToLoad));
93    }
94  },
95  keepAlive: function () {
96    $("#SpektrixKeepAlive").attr('src', SNOOKER.spektrixURL + "/website/Keepalive.aspx");
97  }
98};
99$(document).ready(function () {
100  SNOOKER.layout.init();
101  SNOOKER.iframe.init();
102
103  if ($("#events-table").length) {
104    $.get("/static_events_table.html", function (result) {
105      $('#events-table').html(result);
106    }, "html");
107  }
108});

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.