PageSourceSearch

https://soccernet.ee/new_js/base.js?1718350842-5703

js soccernet.ee collected 2026-10-02 10:08:49 UTC 5,703 bytes, 149 lines download raw bytes

1  /*function hexToRgb(hex) {
2    var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
3    return result ? {
4        r: parseInt(result[1], 16),
5        g: parseInt(result[2], 16),
6        b: parseInt(result[3], 16)
7    } : null;
8  }
9  function setColumnArticleList(id) {
10    for (var i = 1; i < 4; i++) {
11      var display = (i == id ? 'inline' : 'none');
12      var bg = (i == id ? '#ffffff' : '#eaedf2');
13      var color = (i == id ? '#27ae60' : '#484848');            
14      $('#column_article_title' + i).css('background-color', bg);
15      $('#column_article_link' + i).css('color', color);
16      $('#column_article_list' + i).css('display', display);
17    }
18  }   
19  function setColumnMostArticleList(id) {
20    for (var i = 4; i < 6; i++) {
21      var display = (i == id ? 'inline' : 'none');
22      var bg = (i == id ? '#ffffff' : '#eaedf2');
23      var color = (i == id ? '#27ae60' : '#484848');            
24      $('#column_article_title' + i).css('background-color', bg);
25      $('#column_article_link' + i).css('color', color);
26      $('#column_article_list' + i).css('display', display);
27    }
28  }  
29  */
30  function votePoll(poll_id, variant_id, template) {    
31    if (poll_id == '' || poll_id == 0 || variant_id == '') {
32      alert('Palun vali, mille poolt hääletad.');
33    }
34    else {      
35      $.ajax({
36        type: "POST",
37        url: "/lib/controller/poll.controller.php",
38        data: { action: 'vote_poll', poll_id: poll_id, variant_id: variant_id, template: template }
39      })
40        .done(function( obj ) {
41          console.log(obj);
42          variant_list = eval( "(" + obj + ")" );
43          
44          for (v in variant_list) {
45            $('#variant_' + variant_list[v].variant_id).attr('disabled', true);
46            $('#percent_' + variant_list[v].variant_id).html(variant_list[v].percent);
47            $('#green_line_' + variant_list[v].variant_id).css('width', variant_list[v].percent);
48            $('#silver_line_' + variant_list[v].variant_id).css('width', 100-variant_list[v].percent);
49          }
50          
51          $('#poll_button_' + poll_id).html('Hääl antud!');
52          
53          // muudatused lehel (msg annab tagasi variant_id ja protsent)
54          // radio: variant_{$variant->variant_id}
55          // procent: percent_{$variant->variant_id}
56          // green_line_{$variant->variant_id}
57          // silver_line_{$variant->variant_id}
58          // button: poll_button_{$poll_handler->poll->poll_id}
59        }); 
60    }  
61  }   
62  /*
63function toggleTriangleShape(triangle) {
64  var bordertop = $(triangle).find('.triangle').css('border-top-width');
65  if (bordertop == '5px') {
66    $(triangle).find('.triangle').css('border-top', '0px');  
67    $(triangle).find('.triangle').css('border-bottom', '5px solid #fff');  
68    $(triangle).css('background-color', '#27ae60'); 
69    $(triangle).css('border', '1px solid #27ae60');                         
70  }
71  else {
72    $(triangle).find('.triangle').css('border-top', '5px solid #999');  
73    $(triangle).find('.triangle').css('border-bottom', '0px'); 
74    $(triangle).css('background-color', '#fff');
75    $(triangle).css('border', '1px solid #DCDFE4');   
76  }                         
77}
78
79var from = 0;
80
81function load_articles(site_id) {
82  from++;
83  
84  $.ajax({
85    beforeSend: function() {
86      $('#load').removeClass('hidden');
87    },
88    method: "POST",
89    url: "/lib/controller/article.php",
90    data: { action: "load_non_block_articles", site_id: site_id, limit: from }
91  })
92  .done(function(data) {
93    var html = '<div class="table full-width article_medium">';
94    html += '<div class="row">';
95    
96    var j = 1;
97    for (var i = 0; i < data.length; i++) {
98      html += '<div class="cell half-width">';
99      html += '<a href="' + data[i].url + '"><img class="article_image" alt="'+ data[i].headline +'" src="' + data[i].image + '"></a>';
100      if (data[i].topic == 'REKLAAMUUDIS') {
101        html += '<div style="background-color: yellow; padding: 0px 10px 10px 10px;">';
102      }
103      html += '<div class="horizontal-spacer"></div>';
104      html += '<div class="date">';
105      html += data[i].topic;
106      html += '</div>';
107      html += '<div class="article_headline">';
108              
109      if (data[i].hasOwnProperty('icon_title')) {
110        html += '<img src="https://soccernet.ee/new_gfx/icons/' + data[i].icon_type + '.svg" title="' + data[i].icon_title + '" class="icon">';
111      }
112      
113      html += '<a href="' + data[i].url + '">' + data[i].headline + '</a> ';
114      
115      if (data[i].topic != 'REKLAAMUUDIS') {
116        html += '<a href="' + data[i].comment_url + '" class="comment">(' + data[i].comment_count + ')</a> ';
117      }
118
119      html += '<span class="date">';
120      html += '<time class="timeago" datetime="' + data[i].date_added + '">' + data[i].date + '</time>';
121      html += '</span>';
122      html += '</div>';
123      if (data[i].topic == 'REKLAAMUUDIS') {
124        html += '</div>';
125      }
126      html += '</div>';
127      
128      if ((j%2) == 0) {
129        html += '</div>';
130        html += '<div class="row">';
131        html += '<div class="cell horizontal-spacer"></div>';
132        html += '<div class="cell horizontal-spacer"></div>';
133        html += '<div class="cell horizontal-spacer"></div>'; 
134        html += '</div>';  
135        html += '<div class="row">';  
136      }
137      else {
138        html += '<div class="cell 2-procent-vertical-spacer">&nbsp;</div>';  
139      }
140      j++;
141    }
142    
143    html += '</div>';
144    
145    $('#new_articles').append(html);
146      
147    $('#load').addClass('hidden');
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.