mirror of
https://github.com/DJSundog/wg-portal.git
synced 2024-11-23 15:13:52 -05:00
31 lines
978 B
JavaScript
31 lines
978 B
JavaScript
(function($) {
|
|
"use strict"; // Start of use strict
|
|
|
|
// Smooth scrolling using jQuery easing
|
|
$(document).on('click', 'a.scroll-to-top', function(e) {
|
|
var $anchor = $(this);
|
|
$('html, body').stop().animate({
|
|
scrollTop: ($($anchor.attr('href')).offset().top)
|
|
}, 1000, 'easeInOutExpo');
|
|
e.preventDefault();
|
|
});
|
|
|
|
$(function () {
|
|
$('[data-toggle="tooltip"]').tooltip()
|
|
});
|
|
|
|
$(".online-status").each(function(){
|
|
const onlineStatusID = "#" + $(this).attr('id');
|
|
$.get( "/user/status?pkey=" + encodeURIComponent($(this).attr('data-pkey')), function( data ) {
|
|
console.log(onlineStatusID + " " + data)
|
|
if(data === true) {
|
|
$(onlineStatusID).html('<i class="fas fa-link text-success"></i>');
|
|
} else {
|
|
$(onlineStatusID).html('<i class="fas fa-unlink"></i>');
|
|
}
|
|
});
|
|
});
|
|
})(jQuery); // End of use strict
|
|
|
|
|