mirror of
https://github.com/psforever/PSFPortal.git
synced 2026-01-19 18:14:45 +00:00
* Change favicon * Display account banned status on admin search * Pull in application version from Webpack * Add "Feedback" button in footer and github references * Fix faction icons to make them the same size * PaginatedList component now supports back * Tabbed navs support back * Hide Pagination when only one page * Improve admin table style and size
20 lines
426 B
JavaScript
20 lines
426 B
JavaScript
import jq from 'jquery'
|
|
|
|
export function monitor_tabs(callback) {
|
|
jq('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
|
|
var hash = jq(e.target).attr('href');
|
|
if (callback)
|
|
callback(hash);
|
|
if (history.pushState) {
|
|
history.replaceState(null, null, hash);
|
|
} else {
|
|
location.hash = hash;
|
|
}
|
|
});
|
|
|
|
var hash = window.location.hash;
|
|
if (hash) {
|
|
jq('.nav-link[href="' + hash + '"]').tab('show');
|
|
}
|
|
}
|