# king-addons/51.1.65/includes/widgets/Review_Schema/script.js

King Addons for Elementor – 80+ Elementor Widgets, 4 000+ Elementor Templates, WooCommerce, Mega Menu, Popup Builder, version 51.1.65. 38 lines.

- Page: https://pluginprobe.com/plugins/king-addons/51.1.65/code/includes/widgets/Review_Schema/script.js
- Raw: https://pluginprobe.com/plugins/king-addons/51.1.65/raw/includes/widgets/Review_Schema/script.js
- Modified: 2026-06-28T21:26: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/king-addons/51.1.65/code/includes/widgets/Review_Schema/script.js#L10-L20`.

```javascript
"use strict";

(function ($) {
    const shouldShow = ($el) => {
        const device = $el.data("device") || "all";
        if (device === "all") return true;
        const isMobile = window.matchMedia("(max-width: 767px)").matches;
        if (device === "mobile") return isMobile;
        if (device === "desktop") return !isMobile;
        return true;
    };

    const initReviewSchema = ($scope) => {
        const $wrap = $scope.find(".king-addons-review");
        if (!$wrap.length) return;

        if (!shouldShow($wrap)) {
            $wrap.hide();
        }
    };

    $(window).on("elementor/frontend/init", function () {
        elementorFrontend.hooks.addAction(
            "frontend/element_ready/king-addons-review-schema.default",
            function ($scope) {
                initReviewSchema($scope);
            }
        );
    });
})(jQuery);








```
