NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript==
// @name NhacCuaTui Remote
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match http://www.nhaccuatui.com/playlist/*
// @grant none
// @require https://unpkg.com/axios/dist/axios.min.js
// ==/UserScript==
(function() {
'use strict';
let sent = 0;
let songId = null;
const REMOTE_URL = 'https://remote.duongdev.me/player';
const _r = () => {
const player = window.player;
const stream = player.nctPlayerMp3.streamingMp3;
const item = stream.item;
if (songId !== item.key) sent = 0;
songId = item.key;
axios.post(REMOTE_URL, {
currentTime: item.currentTime,
avatar: item.avatar,
duration: item.duration,
kbit: item.kbit,
title: item.title,
creator: item.creator,
sent: sent++,
songId: songId
});
setTimeout(_r, 5000);
};
_r();
})();