PageSourceSearch

https://radiorakel.no/wp-content/plugins/proradio-chartvote/assets…/proradio-chartvote-script.js?ver=PR.3.0.2

js radiorakel.no collected 2026-10-02 07:29:51 UTC 1,469 bytes, 52 lines download raw bytes

1/**
2 * @package QT Chartvote
3 * Script for the Qantumthemes Love It plugin
4 */
5
6
7(function($) {
8	"use strict";
9	$.fn.qtChartvoteInit = function(){
10		// var post_id, heart;
11		$("body a.proradio-chartvote-link").off("click");
12
13		$("body a.proradio-chartvote-link").each(function(i,c){
14			var t = $(c);
15			var cookiename = 'voted-'+t.data('chartid')+'-'+t.data('position');
16			if( '1' == $.cookie(cookiename)){
17				$(c).addClass('disabled');
18				$(c).parent().addClass('disabled');
19			}
20		});
21
22		$("body a.proradio-chartvote-link").on("click",function(e){
23			e.preventDefault();
24			e.stopPropagation();
25			var t = $(this);
26			var cookiename = 'voted-'+t.data('chartid')+'-'+t.data('position');
27			if( '1' == $.cookie(cookiename)){
28				t.addClass('disabled');
29			}else {
30				$.cookie(cookiename, '1', { expires: 1, path: '/' }); 
31				$.ajax({
32					type: "post",
33					url: chartvote_ajax_var.url,
34					cache: false,
35					data: "action=track-vote&nonce="+chartvote_ajax_var.nonce+"&position="+t.data('position')+"&move="+t.data('move')+"&chartid="+t.data('chartid'),
36					success: function(data){
37						var dataarr = jQuery.parseJSON(data);
38						t.parent().find(".proradio-chartvote-number").html(dataarr.newvalue);
39						t.parent().find('a').addClass('disabled');
40						t.parent().addClass('disabled');
41					},
42					error: function(e){
43						console.log(e.Error);
44					}
45				});
46			}
47		});
48	};
49	jQuery(document).ready(function() {
50		$.fn.qtChartvoteInit();
51	});
52})(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.