PageSourceSearch

https://orthanc-server.com/orthanc.js

js orthanc-server.com collected 2026-09-24 08:49:03 UTC 3,692 bytes, 149 lines download raw bytes

1// Remove cookies automatically generated by OVH, our hosting provider
2var ovhInterval = setInterval(function() {
3  if (document.readyState === 'complete') {
4    document.cookie='cluster=; expires=Thu, 01 Jan 1970 00:00:01 GMT;';
5    document.cookie='clusterBAK=; expires=Thu, 01 Jan 1970 00:00:01 GMT;';
6    document.cookie='OVHCDN=; expires=Thu, 01 Jan 1970 00:00:01 GMT;';
7    clearInterval(ovhInterval);
8  }
9}, 100);
10
11
12
13// Other solution to scrolling to anchors:
14// http://stackoverflow.com/a/13067009/881731
15
16
17function InitHighlight()
18{
19  //hljs.initHighlightingOnLoad();
20
21  $('pre code').each(function(i, block) {
22    var url = $(block).attr('data');
23    if (url != undefined) {
24      $.ajax({
25        url: url,
26        dataType: 'text',
27        success: function(data) {
28          $(block).text(data);
29          if (!$(block).hasClass('text')) {
30            hljs.highlightBlock(block);
31          }
32        }
33      });
34    } else {
35      if (!$(block).hasClass('text')) {
36        hljs.highlightBlock(block);
37      }
38    }
39  });
40}
41
42
43
44
45$(document).ready(function() {
46
47  // http://stackoverflow.com/a/19006517/881731
48  $.validator.setDefaults({
49    errorElement: "span",
50    errorClass: "help-block",
51    highlight: function (element, errorClass, validClass) {
52      $(element).closest('.form-group').addClass('has-error');
53    },
54    unhighlight: function (element, errorClass, validClass) {
55      $(element).closest('.form-group').removeClass('has-error');
56    },
57    errorPlacement: function (error, element) {
58      if (element.parent('.input-group').length || 
59          element.prop('type') === 'checkbox' || 
60          element.prop('type') === 'radio') {
61        error.insertAfter(element.parent());
62      } else {
63        error.insertAfter(element);
64      }
65    }
66  });
67
68  $('#myForm').validate({
69    rules: {
70      othersector: {
71        required: {
72          depends: function(element) {
73            return $('#inputSector').val() == 'Other';
74          }
75        }
76      }
77    }
78  });
79
80  $('#myCarousel').carousel({
81    interval: 4000,
82    pause: 'none'
83  });
84
85  // Stop the carousel when the mouse is over the carousel controls
86  // http://stackoverflow.com/a/18150406/881731
87  $('.carousel-control,.carousel-caption').mouseover(function() {
88    $("#myCarousel").carousel('pause');
89  }).mouseout(function() {
90    $("#myCarousel").carousel('cycle');
91  });
92
93
94
95  // delegate calls to data-toggle="lightbox"
96  $(document).delegate('*[data-toggle="lightbox"]', 'click', function(event) {
97    event.preventDefault();
98    return $(this).ekkoLightbox({
99      left_arrow_class: 'hidden',
100      right_arrow_class: 'hidden'
101    });
102  });
103
104
105
106  // Install the affix plugin for the "References" page:
107  // http://stackoverflow.com/a/18702972/881731
108  $('#sidebar').affix({
109    offset: {
110      top: $('.jumbotron').height() + $('.navbar-fixed-top').height(),
111      bottom: 450
112    }
113  });
114
115
116  // Handle the "Read more" buttons for the blog entries
117  $('.read-more').on('click', function() {
118    $(this).hide();
119    var content = $(this).attr('read-more');
120    $(content).show('slow');
121  });
122
123
124  $('#menu-resources').on('click', function() {
125    window.location.href = 'static.php?page=resources';
126  });
127
128
129  InitHighlight();
130
131  
132  $('#inputSector').change(function() {
133    if ($('#inputSector').val() == 'Other')
134      $('#othersectordiv').show();
135    else
136      $('#othersectordiv').hide();
137  });
138
139  // Show all the blog entries (when writing)
140  /*$('.read-more').each(function() {
141    $($(this).attr('read-more')).show();
142    });*/
143
144
145  $('.stone-web-viewer-button').click(function() {
146    var src = $(this).attr('data-iframe-src');
147    $('#stone-web-viewer-demo').attr('src', src);
148  });
149});

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.