Merge branch 'master' into websockets

This commit is contained in:
Jeremy "EndenDragon" Zhang
2017-09-02 12:25:11 -07:00
committed by GitHub
8 changed files with 77 additions and 7 deletions

View File

@ -289,6 +289,10 @@ body > div.navbar-fixed > nav > div {
background-color: #546e7a;
}
.modal-overlay {
height: auto;
}
.betatag {
font-variant: small-caps;
font-size: 15px;
@ -375,6 +379,16 @@ a {
width: 305px;
}
#visitor_mode_message_note {
display: none;
}
@media only screen and (min-width: 400px) {
#visitor_mode_message_note {
display: inline;
}
}
#focusmodal {
background-color: rgba(84, 110, 122, 0.58);
text-shadow: 1px 1px 2px black, 0 0 1em #607d8b, 0 0 0.2em #b0bec5;

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 202 KiB

View File

@ -28,6 +28,7 @@
var unauthenticated_users_list = []; // List of all guest users
var discord_users_list = []; // List of all discord users that are probably online
var guild_channels_list = []; // guild channels, but as a list of them
var shift_pressed = false; // Track down if shift pressed on messagebox
function element_in_view(element, fullyInView) {
var pageTop = $(window).scrollTop();
@ -227,8 +228,10 @@
});
primeEmbed();
setInterval(send_socket_heartbeat, 5000);
if (getParameterByName("username")) {
$("#custom_username_field").val(getParameterByName("username"));
}
});
function changeTheme(theme=null, keep_custom_css=true) {
@ -875,12 +878,21 @@
}
}
});
$("#messagebox").keyup(function (event) {
if (event.keyCode == 16) {
shift_pressed = false;
}
});
$("#messagebox").keyup(function(event){
$("#messagebox").keydown(function(event){
if ($(this).val().length == 1) {
$(this).val($.trim($(this).val()));
}
if(event.keyCode == 13 && $(this).val().length >= 1 && $(this).val().length <= 350) {
if (event.keyCode == 16) {
shift_pressed = true;
}
if(event.keyCode == 13 && !shift_pressed && $(this).val().length >= 1 && $(this).val().length <= 350) {
$(this).val($.trim($(this).val()));
$(this).blur();
$("#messagebox").attr('readonly', true);