mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Scrolling to top when changing document
This commit is contained in:
2
static/dist/frontpage.min.js
vendored
2
static/dist/frontpage.min.js
vendored
File diff suppressed because one or more lines are too long
4
static/dist/main.min.js
vendored
4
static/dist/main.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -365,6 +365,8 @@ window.onpopstate = function(e){
|
||||
|
||||
function onepage_load(){
|
||||
$("#channel-load").css("display", "block");
|
||||
window.scrollTo(0, 0);
|
||||
|
||||
var url_split = window.location.href.split("/");
|
||||
if(url_split[3] == "" || url_split[3].substring(0,1) == "#"){
|
||||
$.ajax({
|
||||
|
||||
@@ -202,6 +202,7 @@ var Nochan = {
|
||||
to_channel: function(chan, popstate){
|
||||
|
||||
$("#channel-load").css("display", "block");
|
||||
window.scrollTo(0, 0);
|
||||
|
||||
$.ajax({
|
||||
url: chan + "/php/channel.php",
|
||||
@@ -325,6 +326,7 @@ $(document).on('click', '#toast-container', function(){
|
||||
|
||||
$(document).on('click', ".chan-link", function(e){
|
||||
e.preventDefault();
|
||||
|
||||
Nochan.to_channel($(this).attr("href"), false);
|
||||
});
|
||||
|
||||
@@ -333,6 +335,7 @@ $(".listen-button").click(function(e){
|
||||
if($(".room-namer").val() == ""){
|
||||
e.preventDefault();
|
||||
//window.location = "?chan="+
|
||||
|
||||
Nochan.to_channel($(".room-namer").attr("placeholder"));
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user