# Conflicts: # .gitignore # LICENSE.md # README.md # api.php # app.php # composer.json # composer.lock # lang/en_us.php # lib/login.php # lib/userinfo.php # mobile/index.php # pages.php # pages/404.php # required.php # settings.template.php # static/css/app.css # static/img/logo.png # static/js/app.js
35 lines
878 B
JavaScript
35 lines
878 B
JavaScript
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
function setupTooltips() {
|
|
$('[data-toggle="tooltip"]').tooltip({
|
|
trigger: "click hover focus"
|
|
});
|
|
}
|
|
|
|
$(document).ready(function () {
|
|
/* Fade out alerts */
|
|
$(".alert .close").click(function (e) {
|
|
$(this).parent().fadeOut("slow");
|
|
});
|
|
|
|
/* Activate tooltips */
|
|
setupTooltips();
|
|
});
|
|
|
|
/*
|
|
* Remove feedback params from the URL so they don't stick around too long
|
|
*/
|
|
function getniceurl() {
|
|
var url = window.location.search;
|
|
url = url.substring(url.lastIndexOf("/") + 1);
|
|
url = url.replace(/&?msg=([^&]$|[^&]*)/i, "");
|
|
return url;
|
|
}
|
|
try {
|
|
window.history.replaceState("", "", getniceurl());
|
|
} catch (ex) {
|
|
|
|
}
|