Guest User

Untitled

a guest
Jul 22nd, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /* Initialization */
  2. var lastfm, cache;
  3. var App = (function(lng, undefined) {
  4.     lng.App.init({
  5.         name: "TunaPlayer",
  6.         version: "0.1"
  7.     });
  8.     cache = new LastFMCache();
  9.     lastfm = new LastFM({
  10. //        apiKey: "4f486bdc13ee1905eb54f07b73e207b3",
  11.         apiKey: "4f486bdc13ee1905eb54f07b73e207b",
  12.         apiSecret: "5b3b5e19edadcc1e0e6c0bdd16dd4b35",
  13.         cache: cache
  14.     });
  15.     return {};
  16. })(LUNGO);
  17.  
  18. App.SpinnerConfiguration = {
  19.     lines: 13,
  20.     length: 7,
  21.     width: 3,
  22.     radius: 5,
  23.     rotate: 0,
  24.     color: '#1C1C1C',
  25.     speed: 0.7,
  26.     trail: 50,
  27.     shadow: false,
  28.     hwaccel: true,
  29.     className: 'spinner',
  30.     zIndex: 2e9,
  31.     top: 'auto',
  32.     left: 'auto'
  33. };
  34.  
  35. App.Events = (function(lng, undefined){
  36.     var activate  = function (lng, href) {
  37.         lng.dom("a[href='" + href + "']").addClass("current");
  38.     };
  39.  
  40.     lng.dom("a[href='#libraryLocalCharts']").tap(function(event){
  41.         activate(lng, "#library");
  42.     });
  43.  
  44.     lng.dom("a[href='#libraryCustomList']").tap(function(event){
  45.         activate(lng, "#library");
  46.         var spinner = new Spinner(App.SpinnerConfiguration).spin($$("span.loading")[0]);
  47.         console.log(spinner);
  48.     });
  49.  
  50. /*    lng.dom("a[data-toload='hypedtracks']").tap(function(event){
  51.         lastfm.chart.getHypedTracks(
  52.             {
  53.                 page: 0,
  54.                 limit: 20,
  55.             }, {},
  56.             {
  57.             success: function (data) {
  58.                 console.log(data);
  59.             },
  60.             error: function (code, msg) {
  61. //                alert(errorMsg["loading"]);
  62. //                lng.Router.back();
  63.             }
  64.         });
  65.     });*/
  66. })(LUNGO);
Add Comment
Please, Sign In to add comment