PageSourceSearch

https://www.independent.gr/modules/mod_sp_poll/assets/js/script.js

js independent.gr collected 2026-10-02 09:59:45 UTC 1,634 bytes, 56 lines download raw bytes

1/*------------------------------------------------------------------------
2# mod_sp_poll - Ajax poll module by JoomShaper.com
3# ------------------------------------------------------------------------
4# author    JoomShaper http://www.joomshaper.com
5# Copyright (C) 2010 - 2024 JoomShaper.com. All Rights Reserved.
6# License - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
7# Websites: http://www.joomshaper.com
8-------------------------------------------------------------------------*/
9
10jQuery(function($) {
11	$('.form-sppoll').on('submit', function(event) {
12		event.preventDefault();
13		const self = $(this);
14
15		const values = { id: self.data('id'), vote: self.find('input[type="radio"]:checked').val(), modid: self.data('module_id') };
16		
17		const url = `${Joomla.getOptions('system.paths').rootFull}index.php?option=com_sppolls&task=poll.ajax`;
18
19		$.ajax({
20			type: 'POST',
21			url: url,
22			data: values,
23			beforeSend: function () {
24			},
25			success: function (response) {
26				self.hide();
27				self.parent().find('.sppoll-results').html(response);
28			}
29		});
30	});
31
32	$('.btn-poll-result').on('click', function(event) {
33		event.preventDefault();
34		const parent = $(this).closest('.form-sppoll');
35		
36		const values = {
37			id: $(this).data('result_id'),
38			modid: parent.data('module_id'),
39			subtask: 'result'
40		};
41
42		const url = `${Joomla.getOptions('system.paths').rootFull}index.php?option=com_sppolls&task=poll.ajax`;
43
44		$.ajax({
45			type: 'POST',
46			url: url,
47			data: values,
48			format: 'json',
49			success: function (response) {
50				parent.hide();
51				parent.parent().find('.sppoll-results').html(response);
52			}
53		});
54
55	});
56});

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.