Skip to Content

JavaScript File

URL: https://cougarslut.com/templates/onlyhdtube-green/js/libs.js
HTTP Status: 200 OK
MIME Type: application/javascript
Last Modified: Mon, 27 Feb 2023 17:28:24 GMT
Download Time: Less than a second
Cookies: None
Size: 6 KB
HTTP Headers:  11 headers
Links In:  1 pages
Links Out:  0 links
Images:  0 images
CSS:  0 files
JavaScript:  0 files
OK Issues: No issues found

1

2$(document).ready(function(){

3

4 /* ====================== BUILDING ====================== */

5

6 $('.js-count-percent').each(function() {

7 var a = $(this), b = parseInt(a.find('.ratingtypeplusminus').text(),10), c = parseInt(a.find('span[id*=vote]').text(),10);

8 if ( c >= b && c > 0 ) {

9 var t = Math.round((c - (c - b)/2)/c*100);

10 a.text(t+'%').after('<div class="thumb__rating-bar"><div class="thumb__rating-bar-progress" style="width:'+t+'%"></div></div>');

11 } else {

12 a.text('0%').after('<div class="thumb__rating-bar"><div class="thumb__rating-bar-progress"></div></div>');

13 };

14 a.removeClass('js-count-percent');

15 });

16

17 $('.page__rating').each(function(){

18 var rate = $(this),

19 b = parseInt(rate.find('.ratingtypeplusminus').text(), 10), c = parseInt(rate.find('span[id*=vote]').text(), 10);

20 rate.append('<div class="page__rating-likes"><i>0</i> понравилось <span>| <i>0</i></span> <div class="page__rating-bar"><div class="page__rating-bar-progress"></div></div></div>');

21 if ( c >= b && c > 0 ) {

22 var m = (c - b)/2, p = c - m, fill = Math.round((c - m)/c*100);

23 rate.find('.page__rating-bar-progress').css({'width':''+fill+'%'});

24 rate.find('.page__rating-likes').children('i').html(p);

25 rate.find('.page__rating-likes').children('span').children('i').html(m);

26 console.log('rate '+b+' votes '+c+' prg '+fill+' like '+p+' dislike ' +m+'');

27 };

28 });

29

30 $('.page__comments-list').each(function(){

31 var quantity = $('.comment-item').length;

32 if (quantity > 1) {

33 $('.comment-item:gt(0)').hide();

34 $('.page__comments-list').append('<div class="show-comms"><a href="#">Show all ('+quantity+')</a></div>');

35 };

36 });

37 $(".show-comms > a").click(function(){

38 $(".comment-item").show();

39 $(this).parent().remove();

40 return false;

...

</html>