# darkify/1.4.2/src/Admin/HelpPage/assets/js/help-page.js

Darkify – Dark Mode &amp; Night Mode for Website &amp; Admin (Dark Theme Included), version 1.4.2. 82 lines.

- Page: https://pluginprobe.com/plugins/darkify/1.4.2/code/src/Admin/HelpPage/assets/js/help-page.js
- Raw: https://pluginprobe.com/plugins/darkify/1.4.2/raw/src/Admin/HelpPage/assets/js/help-page.js
- Modified: 2025-05-26T08:19:56+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/darkify/1.4.2/code/src/Admin/HelpPage/assets/js/help-page.js#L10-L20`.

```javascript
; (function ($) {
	const hash = window.location.hash.replace('#', '').split('#')[1];
	$(window).on('hashchange', function() {
		let hash = window.location.hash.replace('#', '').split('#')[1];
		
		if ('get-start' === hash || 'recommended' === hash || 'lite-to-pro' === hash || 'pro-plugins' === hash || '#tab=help' === window.location.hash) {
			$('.darkify-nav.darkify-nav-options ul li:last-child a').addClass('darkify-active');
			$('.darkify-section[data-section-id="help"]').show();
		}
		if( !hash && '#tab=help' !== window.location.hash ) {
			$('.darkify-section[data-section-id="help"]').hide();
		}
	})
	// Help page tab menu script.
	$('.darkify').on('click', '.header_nav_left a', function (e) {
		if ($(this).hasClass('active')) {
			return;
		}
		let tabId = $(this).attr('data-id');
		$('.header_nav_left a').each((i, item) => {
			$(item).removeClass('active');
			$('#' + $(item).attr('data-id')).css('display', 'none');
		})
		$(this).addClass('active');

		$('#' + tabId).css('display', 'block');
	})

	if ('get-start' === hash || 'recommended' === hash || 'lite-to-pro' === hash || 'pro-plugins' === hash) {
		$('.darkify-nav.darkify-nav-options ul li:last-child a').addClass('darkify-active');
		$('.darkify-section[data-section-id="help"]').show();
	}

	if ('get-start' === hash) {
		$('.darkify .header_nav a[data-id="get-start-tab"]').trigger('click');
	}

    if ('recommended' === hash) {
		$('.darkify .header_nav a[data-id="recommended-tab"]').trigger('click');
	}
	if ('lite-to-pro' === hash) {
		$('.darkify .header_nav a[data-id="lite-to-pro-tab"]').trigger('click');
	}
	if ('pro-plugins' === hash) {
		$('.darkify .header_nav a[data-id="pro-plugins-tab"]').trigger('click');
	}

	$('body').on('click', '.install-now', function (e) {
		var _this = $(this);
		var _href = _this.attr('href');

		_this.addClass('updating-message').html('Installing...');

		$.get(_href, function (data) {
			location.reload();
		});

		e.preventDefault();
	});

	document.addEventListener("DOMContentLoaded", function () {
        const playListItems = document.querySelectorAll(".play_list_item");
        const iframe = document.querySelector(".video iframe");

        playListItems.forEach(item => {
            item.addEventListener("click", function () {
                // Get the video ID from data attribute
                const videoId = this.getAttribute("data-video_id");

                // Update iframe source
                iframe.src = `https://www.youtube.com/embed/${videoId}?autoplay=1`;

                // Remove 'active' class from all items
                playListItems.forEach(el => el.classList.remove("active"));

                // Add 'active' class to clicked item
                this.classList.add("active");
            });
        });
    });

})(jQuery);
```
