From d3642364d096de3d3d4233aad33f928f9facbb74 Mon Sep 17 00:00:00 2001 From: "Nicolas A. Tonne" Date: Mon, 20 Apr 2015 14:30:53 +0200 Subject: [PATCH] Error handling, localstorage fix, styling, search stuff, boobs, fucks and colored people --- index.php | 10 +++++----- php/footer.php | 4 +++- php/nochan.php | 2 +- static/css/style.css | 12 +++++++----- static/js/playercontrols.js | 6 ++++-- static/js/search.js | 4 ++++ static/js/youtube.js | 2 +- 7 files changed, 25 insertions(+), 15 deletions(-) diff --git a/index.php b/index.php index 1eb49538..2986cd1e 100755 --- a/index.php +++ b/index.php @@ -26,17 +26,17 @@ diff --git a/php/nochan.php b/php/nochan.php index 826bdffa..e4e69a76 100755 --- a/php/nochan.php +++ b/php/nochan.php @@ -138,7 +138,7 @@ if(isset($_GET['chan'])){

-

diff --git a/static/css/style.css b/static/css/style.css index 622f86cc..60e99ffc 100755 --- a/static/css/style.css +++ b/static/css/style.css @@ -65,11 +65,12 @@ main { } nav .zbrand{ - max-width: 22%; - overflow: hidden; - position: relative; - padding-left: 0; - margin-left: -10px; +max-width: 22%; +min-width: 200px; +overflow: hidden; +position: relative; +font-size: 30px; +padding: 0 20px; } .fullwidth{ @@ -237,6 +238,7 @@ hide mdi-action-visibility mdi-action-visibility-off } .chan{ + padding-right:10px; text-shadow: 4px 4px 9px rgba(0, 0, 0, 0.42); } diff --git a/static/js/playercontrols.js b/static/js/playercontrols.js index 4a51a90a..88b4c059 100755 --- a/static/js/playercontrols.js +++ b/static/js/playercontrols.js @@ -25,11 +25,13 @@ function fitToScreen() function initSlider() { - if(localStorage.getItem("volume") !== undefined) + if(localStorage.volume) { vol = localStorage.getItem("volume"); - }else + }else{ vol = 100; + localStorage.setItem("volume", vol); + } $("#volume").slider({ min: 0, max: 100, diff --git a/static/js/search.js b/static/js/search.js index 739b6352..41b57d3f 100755 --- a/static/js/search.js +++ b/static/js/search.js @@ -111,6 +111,10 @@ $(document).keyup(function(e) { } }); +function showSearch(){ + $("#search-wrapper").toggleClass("hide"); + $("#song-title").toggleClass("hide"); +} function search(search_input){ diff --git a/static/js/youtube.js b/static/js/youtube.js index d9bf0fc2..37ac5d59 100755 --- a/static/js/youtube.js +++ b/static/js/youtube.js @@ -215,7 +215,7 @@ function getTitle(titt, v) function errorHandler(newState) { - socket.emit("end", video_id); + socket.emit("skip"); } function onPlayerReady(event) {