Skip to content
Snippets Groups Projects
Commit 5eec2783 authored by Ludovic Fauvet's avatar Ludovic Fauvet
Browse files

live counter: automatically display the counter for the given VLC version

parent 17f1980e
No related branches found
No related tags found
No related merge requests found
......@@ -236,7 +236,7 @@ function downloadButton2($dropdownItems = null, $targetOS = null, $displayMainOS
function openWSCounterSocket() {
if (ws === undefined || ws.readyState === undefined || ws.readyState > 1) {
ws = new WebSocket("wss://get.videolan.org/wscounter");
ws = new WebSocket("wss://get.videolan.org/wscounter/<?php echo $defaultDetail["latestVersion"] ?>");
ws.onmessage = function(event) {
var value = event.data.replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,");
$('#wscounter').text(value + " <?php echo _("downloads so far"); ?>");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment