PageSourceSearch

https://ymanet.ru/components/com_jdownloads/assets/rating/js/ajaxvote.js

js ymanet.ru collected 2026-10-05 00:19:54 UTC 2,045 bytes, 51 lines download raw bytes

1/*
2// "AJAX Vote" Plugin for Joomla! 1.0.x - Version 1.1
3// License: http://www.gnu.org/copyleft/gpl.html
4// Authors: George Chouliaras - Fotis Evangelou - Luca Scarpa
5// Copyright (c) 2006 - 2007 JoomlaWorks.gr - http://www.joomlaworks.gr
6// Project page at http://www.joomlaworks.gr - Demos at http://demo.joomlaworks.gr
7// ***Last update: October 25th, 2007***
8// modified for jdownloads by Arno Betz - www.jdownloads.com
9*/
10
11function jwAjaxVote(id,i,total,total_count){
12	var lsXmlHttp;
13	var div = document.getElementById('jwajaxvote'+id);
14    div.innerHTML='<img src="'+live_site+'components/com_jdownloads/assets/rating/images/loading.gif" border="0" align="absmiddle" /> '+jwajaxvote_lang['UPDATING'];
15	try	{
16		lsXmlHttp=new XMLHttpRequest();
17	} catch (e) {
18		try	{ lsXmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
19		} catch (e) {
20			try { lsXmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
21			} catch (e) {
22				alert("Your browser does not support AJAX!");
23				return false;
24			}
25		}
26	}
27	lsXmlHttp.onreadystatechange=function() {
28		var response;
29		if(lsXmlHttp.readyState==4){
30			setTimeout(function(){ 
31				response = lsXmlHttp.responseText; 
32				if(response=='1') div.innerHTML=jwajaxvote_lang['THANKS'];
33				else div.innerHTML=jwajaxvote_lang['ALREADY_VOTE'];
34			},500);
35			setTimeout(function(){
36				if(response=='1'){
37					var newtotal = total_count+1;
38					if(newtotal!=1)	div.innerHTML='('+(newtotal)+' '+jwajaxvote_lang['VOTES']+')';
39					else div.innerHTML='('+(newtotal)+' '+jwajaxvote_lang['VOTE']+')';
40					var percentage = ((total + i)/(newtotal))*20;
41					document.getElementById('rating'+id).style.width=percentage+'%';
42				} else {
43					if(total_count!=1)	div.innerHTML='('+(total_count)+' '+jwajaxvote_lang['VOTES']+')';
44					else div.innerHTML='('+(total_count)+' '+jwajaxvote_lang['VOTE']+')';
45				}
46			},2000);
47		}
48	}
49	lsXmlHttp.open("GET",live_site+"components/com_jdownloads/assets/rating/ajax.php?task=vote&user_rating="+i+"&cid="+id,true);
50	lsXmlHttp.send(null);			
51}

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.