PageSourceSearch

https://www.bbrhit40.com/wp-content/plugins/qt-chartvote/js/qt-chartvote-script.js?ver=2.0

js bbrhit40.com collected 2026-10-01 23:47:47 UTC 3,044 bytes, 99 lines download raw bytes

1/**
2 * @package QT Chartvote
3 * Script for the Qantumthemes Chart Vote
4 * V. 1.2
5 */
6
7
8(function($) {
9	"use strict";
10	$.fn.qtChartvoteInit = function(){
11
12		$("body a.qt-chartvote-link").off("click");
13
14		$("body a.qt-chartvote-link").each(function(i,c){
15			var t = $(c);
16			var cookiename = 'voted-'+t.data('chartid')+'-'+t.data('position');
17			if( '1' == $.cookie(cookiename)){
18				$(c).addClass('disabled');
19				$(c).parent().addClass('disabled');
20			}
21			/*if(null !== $.cookie(cookiename) ) {
22				t.on("click",function(e){
23					e.stopPropagation();
24					e.preventDefault();
25					return;
26				});
27				t.parent().css({'cursor': 'not-allowed'}).addClass('vote-disabled').find('a').css({'color':'#ddd'});
28			}*/
29		});
30		
31		$("body a.qt-chartvote-link").on("click",function(e){
32			e.preventDefault();
33			e.stopPropagation();
34			var t = $(this);
35
36			var cookiename = 'voted-'+t.data('chartid')+'-'+t.data('position');
37			if( '1' == $.cookie(cookiename)){
38				t.addClass('disabled');
39				// alert("You already voted for this track. Only 1 vote a day is allowed.");
40			}else {
41				$.cookie(cookiename, '1', { expires: 1, path: '/' }); 
42				$.ajax({
43					type: "post",
44					url: chartvote_ajax_var.url,
45					cache: false,
46					data: "action=track-vote&nonce="+chartvote_ajax_var.nonce+"&position="+t.data('position')+"&move="+t.data('move')+"&chartid="+t.data('chartid'),
47					success: function(data){
48						var dataarr = jQuery.parseJSON(data);
49						t.parent().find(".qt-chartvote-number").html(dataarr.newvalue);
50						t.parent().find('a').addClass('disabled');
51						t.parent().addClass('disabled');
52					},
53					error: function(e){
54						alert("Sorry, we can't contact the server at the moment, please try later.");
55						console.log(e.Error);
56					}
57				});
58			}
59		});
60		/*$("body a.qt-chartvote-link").on("click",function(e){
61			e.stopPropagation();
62			e.preventDefault();
63			var t = $(this);
64			if( t.parent().hasClass('vote-disabled') ){
65				return;
66			}
67
68			var cookiename = 'voted-'+t.data('chartid')+'-'+t.data('position');
69			t.parent().css({'cursor': 'not-allowed'}).addClass('vote-disabled').find('a').css({ 'color':'#ddd'});
70
71			if(null == $.cookie(cookiename) ) {
72				$.ajax({
73					type: "post",
74					url: chartvote_ajax_var.url,
75					cache: false,
76					data: "action=track-vote&nonce="+chartvote_ajax_var.nonce+"&position="+t.data('position')+"&move="+t.data('move')+"&chartid="+t.data('chartid'),
77					success: function(data){
78						if( '1' !== $.cookie(cookiename)){
79							var dataarr = jQuery.parseJSON(data);
80							t.parent().find(".qt-chartvote-number").html(dataarr.newvalue).css({'font-weight':'bold'});
81							$.cookie(cookiename, '1', { path: '/' }); // session cookie only
82						} else {
83							alert("You already voted for this track");
84						}
85						return;
86					},
87					error: function(e){
88						alert("Sorry, we can't contact the server in this moment. Please try later.");
89						return;
90					}
91				});
92			} else {
93				alert("Sorry, you already voted this track.");
94				return;
95			}
96			return;
97		});*/
98	};
99})(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.