From 7a7f4cbb08c98276918dfbf751b0cac12f86b58a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kasper=20Rynning-T=C3=B8nnesen?= Date: Fri, 24 Apr 2015 20:24:38 +0200 Subject: [PATCH 1/3] Removed the stupid deprecatedapinotification --- static/js/search.js | 3 ++- static/js/youtube.js | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/static/js/search.js b/static/js/search.js index d9d758d6..99561bac 100755 --- a/static/js/search.js +++ b/static/js/search.js @@ -135,6 +135,7 @@ function search(search_input){ dataType:"jsonp", success: function(response) { + console.log(response); if(response.data.items) { var wrapper = ""; @@ -142,7 +143,7 @@ function search(search_input){ $.each(response.data.items, function(i,data) { if(data.duration > 720 && longsongs == true){return;} - if(data.category == "Music" || music == false){ + if((data.category == "Music" || music == false) && i > 1){ var video_title=encodeURIComponent(data.title).replace(/'/g, "\\\'"); var views=data.viewCount; var video_thumb = "http://i.ytimg.com/vi/"+data.id+"/default.jpg"; diff --git a/static/js/youtube.js b/static/js/youtube.js index 14eac9fc..e00a3729 100755 --- a/static/js/youtube.js +++ b/static/js/youtube.js @@ -209,10 +209,10 @@ function getTitle(titt, v) { var outPutWord = v > 1 ? "viewers" : "viewer"; var title= decodeURIComponent(titt); - var elem = $('#song-title'); + var elem = document.getElementById('song-title'); document.title = title + " • Zöff"; if(!window.mobilecheck()){ - elem.text = title; + elem.innerHTML = title; document.getElementById('viewers').innerHTML = v + " " + outPutWord; elem.title = title + " • " + v + " " + outPutWord; } From 6efd5b7b338ebd84ad95e023d6e54e9c814e1f81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kasper=20Rynning-T=C3=B8nnesen?= Date: Fri, 24 Apr 2015 20:26:40 +0200 Subject: [PATCH 2/3] Its called realm --- static/js/admin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/js/admin.js b/static/js/admin.js index 86ede176..539551bd 100755 --- a/static/js/admin.js +++ b/static/js/admin.js @@ -50,7 +50,7 @@ socket.on("pw", function(msg) refresh_scroll(); localStorage.setItem(chan.toLowerCase(), msg); - Materialize.toast("Correct password. You now have access to the sacred relam of The Admin.", 4000); + Materialize.toast("Correct password. You now have access to the sacred realm of The Admin.", 4000); }); socket.on(chan.toLowerCase()+",conf", function(msg) From 2d18ee8ef63e8507e2c01ed5b6241973de7983f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kasper=20Rynning-T=C3=B8nnesen?= Date: Fri, 24 Apr 2015 20:52:59 +0200 Subject: [PATCH 3/3] Search is there, just need styling --- index.php | 4 ++-- static/js/search.js | 15 +++++++++++---- static/js/youtube.js | 10 +++++++--- 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/index.php b/index.php index 135fed1a..9de4f303 100755 --- a/index.php +++ b/index.php @@ -25,7 +25,7 @@ / - +
  • Loading... @@ -64,7 +64,7 @@
    -
    +