Skip to content

Commit

Permalink
Minor performance tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
explodingcamera committed Jun 4, 2016
1 parent 98016e9 commit 0f91c79
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 25 deletions.
16 changes: 6 additions & 10 deletions webserver/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@
<meta name="viewport" content="width=device-width, initial-scale=0.8">
<meta name="theme-color" content="1C1C1F">
<title>musiqpad - join us!</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/emojione/2.0.0/assets/css/emojione.min.css"/>
<link rel="shortcut icon" type="image/png" href="/pads/lib/img/icon.png" id="dynamic-favicon"/>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/emojione/2.0.0/assets/css/emojione.min.css"/>
<link href="https://cdn.musiqpad.com/css/mdi.min.css" media="all" rel="stylesheet" type="text/css" />
<!--<script src="//code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>-->
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.css">
<link rel="stylesheet" type="text/css" href="https://cdn.musiqpad.com/css/tour.min.css">
<link rel="stylesheet" type="text/css" href="/pads/lib/css/back.css">
Expand All @@ -17,7 +16,6 @@
<link rel="stylesheet" type="text/css" href="/pads/lib/css/chat.css">
<link rel="stylesheet" type="text/css" href="/pads/lib/css/icons.css">
<link rel="stylesheet" type="text/css" href="/pads/lib/css/menus.css">
<!--<link rel="stylesheet" type="text/css" href="https://cdn.musiqpad.com/css/emojify.css">-->
<link rel="stylesheet" type="text/css" href="https://cdn.musiqpad.com/css/minicolors.css">
</head>
<body data-ng-app="musiqpad" data-ng-controller="MainController">
Expand Down Expand Up @@ -62,7 +60,7 @@
<div class="video-blocked-list">
<div class="yt-blocked-sng" data-cid="{{z.cid}}" data-ng-repeat="z in searchResultsBlockedVideo" title="{{z.title}}">
<!--<div class="nav"><div class="mdi mdi-plus-circle"></div></div>-->
<div class="nail" style="background-image: url('{{z.thumbnail}}')"></div>
<div class="nail" ng-style="{'background-image':'url('+'{{z.thumbnail}}'+''}"></div>
<div class="text" data-ng-bind="z.title"></div>
<div class="dur">
{{makeTime(z.duration)}}
Expand Down Expand Up @@ -90,7 +88,7 @@
<div class="nav logo-btn-logout" title="Logout"><div class="mdi mdi-power-settings"></div></div>
</div>
<div ng-show="prop.t == 1" class="logo-tab lobby">
<iframe src="https://musiqpad.com/lounge"></iframe>
<iframe src="https://musiqpad.com/lounge/"></iframe>
</div>
<!--<div ng-show="prop.t == 2" class="logo-tab settings">
<div class="settings-wrapper">
Expand Down Expand Up @@ -467,7 +465,7 @@
<div class="lib-search-list" data-ng-show="!viewedPl">
<div class="yt-sng" data-ng-repeat="z in searchResults" data-cid="{{z.cid}}" title="{{z.title}}">
<!--<div class="nav"><div class="mdi mdi-plus-circle"></div></div>-->
<div class="nail" style="background-image: url('{{z.thumbnail}}')"></div>
<div class="nail" ng-style="{'background-image':'url('+'{{z.thumbnail}}'+''}"></div>
<div class="text" data-ng-bind="z.title"></div>
<div class="dur">{{makeTime(z.duration)}}</div>
</div>
Expand Down Expand Up @@ -711,13 +709,11 @@

<!--<script src="../lib/js/emojify.min.js"></script>-->
<!--<script>emojify.setConfig({img_dir:'https://raw.githubusercontent.com/Ranks/emojify.js/master/dist/images/basic'});</script>-->
<script src="//code.jquery.com/jquery-1.11.3.min.js"></script>
<script src="//code.jquery.com/ui/1.11.4/jquery-ui.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.4.7/angular.min.js"></script>
<script src="https://cdn.jsdelivr.net/jquery/2.2.4/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/angularjs/1.5.5/angular.min.js"></script>
<script src="https://cdn.musiqpad.com/js/minicolors.js"></script>
<script src="https://cdn.musiqpad.com/js/angular-minicolors.js"></script>
<script src="https://cdn.musiqpad.com/js/jquery.caret.js"></script>
<script src="https://cdn.musiqpad.com/js/jquery.mobile.js"></script>
<script src='https://www.google.com/recaptcha/api.js'></script>
<script src="https://cdn.musiqpad.com/js/tour.min.js"></script>
<script src="https://cdn.musiqpad.com/js/sha256.js"></script>
Expand Down
1 change: 1 addition & 0 deletions webserver/public/lib/css/back.css
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ a {
height: 100%;
z-index: 1000;
background: #0a0a0a;
transition: top cubic-bezier(0.4, 0, 0.2, 1) 1600ms;
}
.load.active {
transition-property: all;
Expand Down
28 changes: 13 additions & 15 deletions webserver/public/lib/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -6980,18 +6980,20 @@
/* Window resizing */
$(window).on('load', function(){
MP.session.oldPageTitle = document.title;
var win = $(this);
var settings = JSON.parse(localStorage.getItem("settings"));
var win = $(this);
var settings = JSON.parse(localStorage.getItem("settings"));

if (settings.player.stream && win.width() < 800) {
API.chat.log('<br>Your screen is too small to display the video, use /stream to disable it','Tips');
}

if (win.width() < 1366) {
($('.playback').hasClass('fullscreen')) ? null : API.fullscreen();
}else{
(settings.player.fullscreen && !$('.playback').hasClass('fullscreen')) ? API.fullscreen() : null;
}
if (win.width() < 1366) {
($('.playback').hasClass('fullscreen')) ? null : API.fullscreen();
}
else {
(settings.player.fullscreen && !$('.playback').hasClass('fullscreen')) ? API.fullscreen() : null;
}
$('.loader, .loading').fadeOut(1000);
$('.load').css('top', '-100%');
});
$(window).on('resize', function(){
$('.user-menu').hide();
Expand Down Expand Up @@ -7606,12 +7608,8 @@
},
events: {
'onReady': function(){
setTimeout(function(){
$('.loader, .loading').fadeOut(1000);
$('.load').slideToggle(1000);
if (playerSettings.stream && player.getPlayerState() == -1)
MP.videoNotAvailable();
},2 * 1000);
if (playerSettings.stream && player.getPlayerState() == -1)
MP.videoNotAvailable();
clearInterval(interval);
API.player.getPlayer = function(){
return player;
Expand Down Expand Up @@ -7767,4 +7765,4 @@ $.fn.serializeObject = function()
}
});
return o;
};
};

0 comments on commit 0f91c79

Please sign in to comment.