69a2430e5a
Add limited dynanicism to langf. Eliminate a few queries when updating user stats. Minor clean-up. Namespace the profile language strings.
23 lines
522 B
JavaScript
23 lines
522 B
JavaScript
function handle_profile_hashbit() {
|
|
var hash_class = "";
|
|
switch(window.location.hash.substr(1)) {
|
|
case "ban_user":
|
|
hash_class = "ban_user_hash";
|
|
break;
|
|
case "delete_posts":
|
|
hash_class = "delete_posts_hash";
|
|
break;
|
|
default:
|
|
console.log("Unknown hashbit");
|
|
return;
|
|
}
|
|
$(".hash_hide").hide();
|
|
$("." + hash_class).show();
|
|
}
|
|
|
|
(() => {
|
|
addInitHook("end_init", () => {
|
|
if(window.location.hash) handle_profile_hashbit();
|
|
window.addEventListener("hashchange", handle_profile_hashbit, false);
|
|
});
|
|
})(); |