PageSourceSearch

https://sportsondrio.it/sites/all/modules/pollim/modules/choices/js/choices.js?teytem

js sportsondrio.it collected 2026-09-25 11:47:19 UTC 1,380 bytes, 40 lines download raw bytes

1
2(function ($) {
3  Drupal.behaviors.choices = {
4    attach: function (context) {
5      $('.entity-pollim input.choice', context).click(function() {
6        var $this = $(this);
7        var $container = $this.closest('.entity-pollim');
8        var entityId = $this.attr('entityid');
9        var url = Drupal.settings['basePath'] + "pollim/ajax/vote/" + entityId;
10        var value = $this.val();
11        $.cookie('pi-' + entityId, value, { expires: 31, path: '/' });
12        $.post(url, {data: value}, function(response) {
13          Drupal.detachBehaviors($container);
14          $container.replaceWith($(response));
15          processRadioButtons($('body'));
16        });
17      });
18      processRadioButtons(context);
19    }
20  };
21  
22  var processRadioButtons = function(context) {
23    $('.entity-pollim input.choice', context).each(function() {
24        var $this = $(this);
25        if ($this.attr('entityid')) {
26          $this.css('visibility', 'visible');
27          var $container = $this.closest('.entity-pollim');
28          var cookieVal = $.cookie('pi-' + $this.attr('entityid'));
29          
30          if (cookieVal) {
31            $container.addClass('voted');
32            $this.attr('disabled', 'disabled');
33            $('input.choice[value=' +cookieVal+ ']', $this.closest('.entity-pollim')).attr('checked', 'checked');
34          }
35        }
36    });
37  }
38  
39      
40})(jQuery);

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.