MCPcopy Index your code
hub / github.com/zxlie/FeHelper / _bindToolbarCollapseBehavior

Function _bindToolbarCollapseBehavior

apps/json-format/content-script.js:574–599  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

572 };
573
574 let _bindToolbarCollapseBehavior = () => {
575 let toolbar = document.getElementById('jfToolbar');
576 if (!toolbar || toolbar.dataset.fhJsonToolbarCollapseBound) {
577 return;
578 }
579
580 toolbar.dataset.fhJsonToolbarCollapseBound = '1';
581 toolbar.addEventListener('mouseenter', () => {
582 clearTimeout(toolbarCollapseAutoTuckTimer);
583 _setToolbarTucked(false);
584 });
585 toolbar.addEventListener('mouseleave', () => {
586 if (toolbar.classList.contains('t-collapse')) {
587 _scheduleToolbarAutoTuck(1200);
588 }
589 });
590 toolbar.addEventListener('focusin', () => {
591 clearTimeout(toolbarCollapseAutoTuckTimer);
592 _setToolbarTucked(false);
593 });
594 toolbar.addEventListener('focusout', () => {
595 if (toolbar.classList.contains('t-collapse')) {
596 _scheduleToolbarAutoTuck(1200);
597 }
598 });
599 };
600
601 let _setExcludedOriginRestoreButtonFeedback = state => {
602 let button = document.getElementById('fhJsonExcludeSite');

Callers 1

Calls 3

_setToolbarTuckedFunction · 0.85
_scheduleToolbarAutoTuckFunction · 0.85
addEventListenerMethod · 0.45

Tested by

no test coverage detected