philomena/assets/js/staffhider.ts

16 lines
299 B
TypeScript
Raw Normal View History

2019-10-05 02:09:52 +02:00
/**
* StaffHider
*
* Hide staff elements if enabled in the settings.
*/
import { $$ } from './utils/dom';
export function hideStaffTools() {
if (window.booru.hideStaffTools === 'true') {
$$<HTMLElement>('.js-staff-action').forEach(el => {
2019-10-05 02:09:52 +02:00
el.classList.add('hidden');
});
}
}