فهرست منبع

#4883 Ability to override bx_check_mq js function

Alex Trofimov 1 سال پیش
والد
کامیت
647a5ea8a1
1فایلهای تغییر یافته به همراه4 افزوده شده و 0 حذف شده
  1. 4 0
      inc/js/functions.js

+ 4 - 0
inc/js/functions.js

@@ -1487,6 +1487,10 @@ function bx_set_color_scheme_html()
  */
 function bx_check_mq()
 {
+    if (typeof glOnCheckMq === 'function') {
+        return glOnCheckMq();
+    }
+
     return window.getComputedStyle(document.querySelector('body'), '::before').getPropertyValue('content').replace(/'/g, "").replace(/"/g, "");
 }