MCPcopy Create free account
hub / github.com/FreeMovieIR/freemovieir.github.io / manageFabButton

Function manageFabButton

script.js:408–433  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

406 if (!fabOptions) {
407 console.error('عنصر fabOptions یافت نشد');
408 return;
409 }
410
411 fab.addEventListener('click', function(event) {
412 event.stopPropagation();
413 console.log('دکمه FAB کلیک شد، وضعیت فعلی hidden:', fabOptions.classList.contains('hidden'));
414 fabOptions.classList.toggle('hidden');
415 });
416
417 document.addEventListener('click', function(event) {
418 if (!fab.contains(event.target) && !fabOptions.contains(event.target)) {
419 fabOptions.classList.add('hidden');
420 console.log('کلیک خارج از FAB، منو بسته شد');
421 }
422 });
423}
424
425function manageThemeToggle() {
426 const themeToggle = document.getElementById('theme-toggle');
427 const body = document.body;
428
429 if (!themeToggle) {
430 console.warn('عنصر theme-toggle یافت نشد');
431 return;
432 }
433
434 themeToggle.addEventListener('click', () => {
435 body.classList.toggle('dark');
436 const isDark = body.classList.contains('dark');

Callers 1

script.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected