gosora/public/profile_member.js

23 lines
607 B
JavaScript
Raw Normal View History

function handle_profile_hashbit() {
2022-02-21 03:16:15 +00:00
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:
log("Unknown hashbit");
return;
}
$(".hash_hide").hide();
$("." + hash_class).show();
}
(() => {
addInitHook("end_init", () => {
2022-02-21 03:16:15 +00:00
if(window.location.hash) handle_profile_hashbit();
window.addEventListener("hashchange", handle_profile_hashbit, false);
});
})();