PageSourceSearch

https://vektr.com/scripts/widgets/counter.js

js vektr.com collected 2026-10-02 00:19:47 UTC 668 bytes, 25 lines download raw bytes

1"use strict"; var $ = jQuery;
2module.exports = function($context, script){
3	var isPoorBrowser = $('html').hasClass('poor-browser');
4	if(isPoorBrowser) return;
5	$context.find('.counter .count').each(function(){
6		var $this = $(this);
7		var count = parseInt($this.text());
8		var cnt = {n: 0}
9		var tw = new TWEEN.Tween(cnt)
10			.to({n: count}, 1000)
11			.onUpdate(function(){
12				$this.text(Math.round(this.n));
13			})
14			.easing(TWEEN.Easing.Quartic.InOut);
15		var pause = function(){
16			tw.stop();
17		}
18		var resume = function(){
19			cnt.n = 0;
20			tw.start();
21		}
22		var start = resume;
23		script.players.addPlayer($this, start, pause, resume);
24	});
25};

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.