mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Added button for generating channelname in frontpage
This commit is contained in:
@@ -303,6 +303,7 @@ var Frontpage = {
|
||||
$("#main-container").css("background-color", "#2d2d2d");
|
||||
if(!Helper.mobilecheck()) {
|
||||
$("#frontpage-viewer-counter").tooltip("remove");
|
||||
$(".generate-channel-name").tooltip("remove");
|
||||
$("#offline-mode").tooltip("remove");
|
||||
}
|
||||
currently_showing_channels = 1;
|
||||
@@ -437,6 +438,11 @@ var Frontpage = {
|
||||
position: "bottom",
|
||||
tooltip: "Total Viewers"
|
||||
});
|
||||
$(".generate-channel-name").tooltip({
|
||||
delay: 5,
|
||||
position: "bottom",
|
||||
tooltip: "Generate name"
|
||||
});
|
||||
}
|
||||
Frontpage.get_frontpage_lists();
|
||||
|
||||
|
||||
@@ -1139,6 +1139,18 @@ $(document).on("click", "#player_bottom_overlay", function(e){
|
||||
Frontpage.to_channel(chan.toLowerCase(), false);
|
||||
});
|
||||
|
||||
$(document).on("click", ".generate-channel-name", function(e) {
|
||||
e.preventDefault();
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "/api/generate_name",
|
||||
success: function(response) {
|
||||
$(".room_namer").val("");
|
||||
$(".room-namer").val(response);
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
$(document).keydown(function(event) {
|
||||
if(window.location.pathname != "/"){
|
||||
if(event.keyCode == 91 || event.keyCode == 17){
|
||||
|
||||
Reference in New Issue
Block a user