Advertisement
Guest User

Untitled

a guest
Oct 4th, 2014
283
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Frperg genpx ==> Rot13 to Secret track
  2.  
  3.  
  4. function playAudio(_0x1bf6x2) {
  5.     var _0x1bf6x3 = window['audioObjects'][_0x1bf6x2];
  6.     if (_0x1bf6x3) {
  7.         if (!_0x1bf6x3['requestPlaying']) {
  8.             _0x1bf6x3['play']();
  9.         } else {
  10.             _0x1bf6x3['stop']();
  11.         };
  12.     };
  13. };
  14.  
  15. function restartAudio(_0x1bf6x2) {
  16.     var _0x1bf6x3 = window['audioObjects'][_0x1bf6x2];
  17.     if (_0x1bf6x3) {
  18.         _0x1bf6x3['restart']();
  19.     };
  20. };
  21. String['prototype']['q4x'] = String['prototype']['le3'] = String['prototype']['a3q'] = function (_0x1bf6x3) {
  22.     return (_0x1bf6x3 ? _0x1bf6x3 : this)['split']('')['map'](function (_0x1bf6x2) {
  23.         if (!_0x1bf6x2['match'](/[A-za-z]/)) {
  24.             return _0x1bf6x2;
  25.         };
  26.         c = Math['floor'](_0x1bf6x2['charCodeAt'](0) / 97);
  27.         k = (_0x1bf6x2['toLowerCase']()['charCodeAt'](0) - 83) % 26 || 26;
  28.         return String['fromCharCode'](k + (c == 0 ? 64 : 96));
  29.     })['join']('');
  30. };
  31. var audioObject = function (_0x1bf6x6, _0x1bf6x7, _0x1bf6x8) {
  32.         this['audio'] = null;
  33.         this['src'] = 'uggc://fgngvp.orpnhfrgurvagre.arg/fpevcg/' ['le3']() + _0x1bf6x7['a3q']() + '.zc3' ['q4x']();
  34.         this['altsrc'] = 'uggc://fgngvp.orpnhfrgurvagre.arg/fpevcg/' ['le3']() + _0x1bf6x7['a3q']() + '.btt' ['q4x']();
  35.         this['duration'] = '--:-- / --:--';
  36.         this['requestPlaying'] = false;
  37.         this['id'] = _0x1bf6x6;
  38.         this['maxDuration'] = _0x1bf6x8;
  39.         var _0x1bf6x9 = this;
  40.         this['play'] = function () {
  41.             if (window['audioObjectPlaying'] != null) {
  42.                 window['audioObjectPlaying']['stop']();
  43.             };
  44.             if (_0x1bf6x9['audio'] == null) {
  45.                 _0x1bf6x9['createAudioHooks']();
  46.             };
  47.             _0x1bf6x9['audio']['src'] = _0x1bf6x9['src'];
  48.             if (!(typeof _0x1bf6x9['audio']['canPlayType'] === 'function' && _0x1bf6x9['audio']['canPlayType']('audio/mpeg') !== '')) {
  49.                 _0x1bf6x9['audio']['src'] = _0x1bf6x9['altsrc'];
  50.             };
  51.             _0x1bf6x9['audio']['play']();
  52.             _0x1bf6x9['requestPlaying'] = true;
  53.             window['audioObjectPlaying'] = _0x1bf6x9;
  54.             _0x1bf6x9['updateDisplay']();
  55.         };
  56.         this['restart'] = function () {
  57.             _0x1bf6x9['end']();
  58.             _0x1bf6x9['play']();
  59.         };
  60.         this['isPlaying'] = function () {
  61.             return !_0x1bf6x9['audio']['paused'];
  62.         };
  63.         this['secondsToTime'] = function (_0x1bf6xa) {
  64.             if (!isFinite(_0x1bf6xa)) {
  65.                 return '--:--';
  66.             };
  67.             var _0x1bf6xb = Math['floor'](_0x1bf6xa / 60);
  68.             var _0x1bf6xc = Math['floor'](_0x1bf6xa) - (_0x1bf6xb * 60);
  69.             if (_0x1bf6xb < 10) {
  70.                 _0x1bf6xb = '0' + _0x1bf6xb;
  71.             };
  72.             if (_0x1bf6xc < 10) {
  73.                 _0x1bf6xc = '0' + _0x1bf6xc;
  74.             };
  75.             return _0x1bf6xb + ':' + _0x1bf6xc;
  76.         };
  77.         this['onDurationChange'] = function () {
  78.             var _0x1bf6xd = '--:--';
  79.             if (_0x1bf6x9['audio'] != null) {
  80.                 if (_0x1bf6x9['audio']['currentTime']) {
  81.                     _0x1bf6xd = _0x1bf6x9['secondsToTime'](_0x1bf6x9['audio']['currentTime']);
  82.                 };
  83.                 var _0x1bf6xe;
  84.                 if (_0x1bf6x9['maxDuration']) {
  85.                     if (_0x1bf6x9['maxDuration'] - _0x1bf6x9['audio']['currentTime'] < 1) {
  86.                         _0x1bf6x9['end']();
  87.                     };
  88.                     _0x1bf6xe = _0x1bf6x9['secondsToTime'](_0x1bf6x9['maxDuration']);
  89.                 } else {
  90.                     _0x1bf6xe = _0x1bf6x9['secondsToTime'](_0x1bf6x9['audio']['duration']);
  91.                 };
  92.                 _0x1bf6x9['duration'] = _0x1bf6xd + ' / ' + _0x1bf6xe;
  93.                 _0x1bf6x9['updateDisplay']();
  94.             };
  95.         };
  96.         this['stop'] = function () {
  97.             if (_0x1bf6x9['audio'] != null) {
  98.                 _0x1bf6x9['audio']['pause']();
  99.                 _0x1bf6x9['requestPlaying'] = false;
  100.                 _0x1bf6x9['updateDisplay']();
  101.             };
  102.             _0x1bf6x9['updateDisplay']();
  103.         };
  104.         this['createAudioHooks'] = function (_0x1bf6xf) {
  105.             _0x1bf6x9['audio'] = new Audio(_0x1bf6x9['src']);
  106.             if (!(typeof _0x1bf6x9['audio']['canPlayType'] === 'function' && _0x1bf6x9['audio']['canPlayType']('audio/mpeg') !== '')) {
  107.                 _0x1bf6x9['audio']['src'] = _0x1bf6x9['altsrc'];
  108.             };
  109.             _0x1bf6x9['audio']['addEventListener']('durationchange', _0x1bf6x9['onDurationChange']);
  110.             _0x1bf6x9['audio']['addEventListener']('timeupdate', _0x1bf6x9['onDurationChange']);
  111.             _0x1bf6x9['audio']['addEventListener']('pause', _0x1bf6x9['onDurationChange']);
  112.             _0x1bf6x9['audio']['addEventListener']('ended', _0x1bf6x9['end']);
  113.         };
  114.         this['end'] = function () {
  115.             _0x1bf6x9['stop']();
  116.             _0x1bf6x9['audio']['currentTime'] = 0;
  117.             _0x1bf6x9['onDurationChange']();
  118.             _0x1bf6x9['stop']();
  119.             _0x1bf6x9['audio']['src'] = '';
  120.         };
  121.         this['updateDisplay'] = function () {
  122.             var _0x1bf6x10 = document['getElementById'](_0x1bf6x9['id'] + '_PL');
  123.             var _0x1bf6x11 = document['getElementById'](_0x1bf6x9['id'] + '_ANIM');
  124.             var _0x1bf6x12 = document['getElementById'](_0x1bf6x9['id'] + '_PROG');
  125.             console['log'](_0x1bf6x9['audio']['networkState']);
  126.             if (_0x1bf6x9['isPlaying']()) {
  127.                 if (_0x1bf6x10) {
  128.                     _0x1bf6x10['src'] = 'http://static.becausetheinter.net/script/pause.gif';
  129.                     _0x1bf6x12['innerHTML'] = _0x1bf6x9['duration'];
  130.                     _0x1bf6x11['src'] = 'http://static.becausetheinter.net/script/player.gif';
  131.                 };
  132.             } else {
  133.                 if (_0x1bf6x10) {
  134.                     if (_0x1bf6x9['requestPlaying']) {
  135.                         _0x1bf6x10['src'] = 'http://static.becausetheinter.net/script/pause.gif';
  136.                     } else {
  137.                         _0x1bf6x10['src'] = 'http://static.becausetheinter.net/script/start.gif';
  138.                     };
  139.                     _0x1bf6x12['innerHTML'] = _0x1bf6x9['duration'];
  140.                     _0x1bf6x11['src'] = 'http://static.becausetheinter.net/script/playerstop.gif';
  141.                 };
  142.             };
  143.         };
  144.         if (window['audioObjects'] === undefined) {
  145.             window['audioObjects'] = new Object();
  146.             window['audioObjectPlaying'] = null;
  147.         };
  148.         window['audioObjects'][_0x1bf6x6] = this;
  149.     };
  150.  
  151. function generatePlayer(_0x1bf6x14, _0x1bf6x15, _0x1bf6x16, _0x1bf6x17) {
  152.     var _0x1bf6x18 = '';
  153.     _0x1bf6x18 += '<div class="player" id="' + _0x1bf6x14 + '">';
  154.     _0x1bf6x18 += '<div class="player_innerplayer">';
  155.     _0x1bf6x18 += '<img class="player_playbutton" id="' + _0x1bf6x14 + '_PL" src="http://static.becausetheinter.net/script/start.gif" onclick="playAudio(\'' + _0x1bf6x14 + '\')">';
  156.     _0x1bf6x18 += '<div class="player_meta">';
  157.     _0x1bf6x18 += '<span class="player_trackname">' + _0x1bf6x15['a3q']() + '</span><br/>';
  158.     _0x1bf6x18 += '<span class="player_duration" id="' + _0x1bf6x14 + '_PROG">--:-- / --:--</span></div>';
  159.     _0x1bf6x18 += '<img class="player_resetbutton" id="' + _0x1bf6x14 + '_RESET" src="http://static.becausetheinter.net/script/replay.png"  onclick="restartAudio(\'' + _0x1bf6x14 + '\')">';
  160.     _0x1bf6x18 += '<img class="player_animation" id="' + _0x1bf6x14 + '_ANIM" src="http://static.becausetheinter.net/script/playerstop.gif"></div>';
  161.     if (_0x1bf6x17 !== undefined) {
  162.         _0x1bf6x18 += '<script>new audioObject("' + _0x1bf6x14 + '","' + _0x1bf6x16 + '",' + _0x1bf6x17 + ');</script></div>';
  163.     } else {
  164.         _0x1bf6x18 += '<script>new audioObject("' + _0x1bf6x14 + '","' + _0x1bf6x16 + '");</script></div>';
  165.     };
  166.     return _0x1bf6x18;
  167. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement