Prośba o wyciągnięcie linku z kodu

ShutteR

Użytkownik
Dołączył
Czerwiec 22, 2011
Posty
17
Witam, na pewnej stronie natknąłem się na ocenę komentarzy. Ocena ta obsługiwana jest przez przez
Javascript i nie wymaga logowania. Kliknąłem raz, głos zliczony. Klikam drugi raz - pojawia się okno z wiadomością że już głosowałem.
To ciekawe. Zmieniam IP - no tak, można oddać kolejny głos. Jak widać najprościej było dodać taką blokadę.

Wróćmy jednak do tematu. Przycisk prezentuje się tak:
Kod:
<a id="cmt-neg-7180" class="cmt-neg" href="javascript:void(0)" title="Opuść">

Odwołuj się on do kodu:
Kod:
function BxDolCmts (options) {
	this.oCmtElements = {}; // form elements 
	this._sObjName = undefined == options.sObjName ? 'oCmts' : options.sObjName;	// javascript object name, to run current object instance from onTimer
	this._sSystem = options.sSystem; // current comment system
	this._sSystemTable = options.sSystemTable; // current comment system table name
	this._iAuthorId = options.iAuthorId; // this comment's author ID.
	this._iObjId = options.iObjId; // this object id comments
	this._sOrder = options.sOrder == 'asc' || options.sOrder == 'desc' ? options.sOrder : 'asc'; // comments' order	
    this._sActionsUrl = options.sBaseUrl + 'cmts.php'; // actions url address
    this._sVideoActionsUrl = options.sBaseUrl + 'flash/XML.php'; // video actions url address
    this._sDefaultErrMsg = undefined == options.sDefaultErrMsg ? 'Errod Occured' : ''; // default error message
    this._sConfirmMsg = undefined == options.sConfirmMsg ? 'Are you sure?' : options.sConfirmMsg; // confirm message
    
    this._isEditAllowed = parseInt(undefined == options.isEditAllowed ? 0 : options.isEditAllowed); // is edit allowed
    this._isRemoveAllowed = parseInt(undefined == options.isRemoveAllowed ? 0 : options.isRemoveAllowed); // is remove allowed
    this._iSecsToEdit = parseInt(undefined == options.iSecsToEdit ? 0 : options.iSecsToEdit); // number of seconds to allow edit comment
    
    this._oSavedTexts = {};
    
    this._sAnimationEffect = undefined == options.sAnimationEffect ? 'slide' : options.sAnimationEffect;
    this._iAnimationSpeed = undefined == options.iAnimationSpeed ? 'slow' : options.iAnimationSpeed;

	//'A' Use global allow HTML param
    this._sTextAreaId = undefined == options.sTextAreaId || options.sTextAreaId == '' ? 'cmtTextAreaParent' : options.sTextAreaId;
    this._iGlobAllowHtml = undefined == options.iGlobAllowHtml ? '0' : options.iGlobAllowHtml;

    // init post comment form (because browser remeber last inputs, we need to clear it)
    if ($('#cmts-box-' + this._sSystem + '-' + this._iObjId + ' > .cmt-reply > .cmt-post-reply > form').length) {
    	$('#cmts-box-' + this._sSystem + '-' + this._iObjId + ' > .cmt-reply > .cmt-post-reply > form')[0].reset();
    	$('#cmts-box-' + this._sSystem + '-' + this._iObjId + ' > .cmt-reply > .cmt-post-reply > form > [name=CmtParent]').val(0);    
    }

    // clicks handler for ratings
    var $this = this; 
    $('#cmts-box-' + this._sSystem + '-' + this._iObjId).click(function(event) {
    	var iRate = 0;
    	var oLink = $(event.target).parent();
    	if(oLink.hasClass('cmt-pos')) {
    		iRate = 1;
    		event.preventDefault();
    	}
    	else if(oLink.hasClass('cmt-neg')) {
    		iRate = -1;
    		event.preventDefault();
    	}
    	if (iRate != 0 && !$(event.target).parents('.cmt-rate').hasClass('cmt-rate-disabled')) {    		            		
			var e = $(event.target).parents('.cmt-buttons').siblings('.cmt-points').children('span').get();
			$this._rateComment(e, parseInt(oLink.attr('id').substr(8)), iRate);
    	}
    });
}

I tu taka moja prośba, mógłby mi ktoś wyciągnąć z tego skryptu całą ścieżkę do oddania głosu?
Z góry dzięki.
Pozdrawiam
 
Do góry Bottom