2019-03-04 06:43:07 +00:00
|
|
|
function handle_profile_hashbit() {
|
|
|
|
var hash_class = "";
|
|
|
|
switch(window.location.hash.substr(1)) {
|
|
|
|
case "ban_user":
|
|
|
|
hash_class = "ban_user_hash";
|
|
|
|
break;
|
2020-01-14 05:07:00 +00:00
|
|
|
case "delete_posts":
|
|
|
|
hash_class = "delete_posts_hash";
|
|
|
|
break;
|
2019-03-04 06:43:07 +00:00
|
|
|
default:
|
2020-07-23 04:02:16 +00:00
|
|
|
log("Unknown hashbit");
|
2019-03-04 06:43:07 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
$(".hash_hide").hide();
|
|
|
|
$("." + hash_class).show();
|
|
|
|
}
|
|
|
|
|
2019-03-24 07:23:38 +00:00
|
|
|
(() => {
|
|
|
|
addInitHook("end_init", () => {
|
2019-03-04 06:43:07 +00:00
|
|
|
if(window.location.hash) handle_profile_hashbit();
|
|
|
|
window.addEventListener("hashchange", handle_profile_hashbit, false);
|
2019-03-24 07:23:38 +00:00
|
|
|
});
|
|
|
|
})();
|