mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Moved api-keys out of 'sight', and added analytics as optional
This commit is contained in:
@@ -3,7 +3,6 @@ var w_p = true;
|
||||
var hasadmin = 0;
|
||||
var list_html = $("#list-song-html").html();
|
||||
var unseen = false;
|
||||
var api_key = "***REMOVED***";
|
||||
var searching = false;
|
||||
var time_regex = /P((([0-9]*\.?[0-9]*)Y)?(([0-9]*\.?[0-9]*)M)?(([0-9]*\.?[0-9]*)W)?(([0-9]*\.?[0-9]*)D)?)?(T(([0-9]*\.?[0-9]*)H)?(([0-9]*\.?[0-9]*)M)?(([0-9]*\.?[0-9]*)S)?)?/;
|
||||
var conf = [];
|
||||
|
||||
@@ -38,7 +38,7 @@ var Search = {
|
||||
if(search_input !== ""){
|
||||
searching = true;
|
||||
var keyword= encodeURIComponent(search_input);
|
||||
var yt_url = "https://www.googleapis.com/youtube/v3/search?key="+api_key+"&videoEmbeddable=true&part=id&type=video&order=viewCount&safeSearch=none&maxResults=25";
|
||||
var yt_url = "https://www.googleapis.com/youtube/v3/search?key="+api_key+"&videoEmbeddable=true&part=id&type=video&order=relevance&safeSearch=none&maxResults=25";
|
||||
yt_url+="&q="+keyword;
|
||||
if(music)yt_url+="&videoCategoryId=10";
|
||||
if(pagination) yt_url += "&pageToken=" + pagination;
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
||||
|
||||
ga('create', '***REMOVED***', 'auto');
|
||||
ga('create', '{{{ analytics }}}', 'auto');
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript" src="https://code.jquery.com/jquery-2.2.4.min.js"></script>
|
||||
|
||||
Reference in New Issue
Block a user