Tripadvisor precise note

Display the exact Tripadvisor note after the "bubbles"

03.06.2015 itibariyledir. En son verisyonu görün.

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

You will need to install an extension such as Tampermonkey to install this script.

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name        Tripadvisor precise note
// @description Display the exact Tripadvisor note after the "bubbles"
// @namespace   KrisWebDev
// @include     http://www.tripadvisor.fr/*
// @include     http://www.tripadvisor.com/*
// @version     1
// @grant       none
// @require			http://code.jquery.com/jquery-2.1.4.min.js
// ==/UserScript==
 
this.$ = this.jQuery = jQuery.noConflict(true);
 
var coeff = 5;
var result = 0;
var sommeAvis = 0;
var nbAvis = 0;
 
$("span.compositeCount").each(function(index, val) {
   nbAvis = parseInt($(this).text());
   result += nbAvis*coeff--;
   sommeAvis +=  nbAvis;
});
 
result = (Math.round(result/sommeAvis*10))/10;
 
$("span.rate.sprite-rating_rr").after($("<span><b>"+result+"</b></<span>"));