By adding #small to the end of the link, the footer is gone and navigating out is disabled

This commit is contained in:
Kasper Rynning-Tønnesen
2018-09-22 11:40:13 +02:00
parent 2add5d4aae
commit ea01cc082a
3 changed files with 10 additions and 1 deletions

View File

@@ -1,5 +1,9 @@
var Channel = {
init: function() {
if(window.location.hash == "#small") {
small_player = true;
document.querySelector("footer").style.display = "none";
}
if(client) {
Helper.addClass(".tabs", "hide");
Helper.removeClass("#wrapper", "tabs_height");

View File

@@ -12,6 +12,7 @@ try {
_VERSION = 6;
}
var startTime = 0;
var small = false;
var full_playlist;
var hostMode = false;
var soundcloud_enabled = true;

View File

@@ -15,6 +15,7 @@ try {
var soundcloud_enabled = true;
var local_new_channel = false;
var sc_need_initialization = false;
var small_player = false;
var hiddenPlaylist = false;
var videoSource;
var dynamicListeners = {};
@@ -1467,7 +1468,10 @@ function addDynamicListeners() {
addListener("click", ".brand-logo-navigate", function(event){
this.preventDefault();
if(small_player) {
window.open(window.location.origin + window.location.pathname, "_blank");
return;
}
window.history.pushState("to the frontpage!", "Title", "/");
Channel.onepage_load();
});