@@ -1181,6 +1181,14 @@ function bx_prompt(sMessage, sValue, fOnClickOk, fOnClickCancel, oParams)
});
}
+/**
+ * Check if mobile or desktop device.
+ */
+function bx_check_mq()
+{
+ return window.getComputedStyle(document.querySelector('body'), '::before').getPropertyValue('content').replace(/'/g, "").replace(/"/g, "");
+}
+
/**
* This function loads the passed list of js files and executes callback function when the all files are loaded.
* In case when this function is called for dynamic loading of the same file but many times (like Plyr video init)
@@ -3,6 +3,11 @@ html.bx-media-desktop {
font-size:100%;
+/* never visible - used to check MQ */
+.bx-media-desktop body::before {
+ content: 'desktop';
.bx-media-desktop .bx-def-media-desktop-hide {
display:none !important;
@@ -3,6 +3,12 @@ html.bx-media-phone {
font-size:85%;
+.bx-media-phone body::before {
+ display: none;
+ content: 'mobile';
.bx-media-phone .bx-def-media-phone-hide {
@@ -3,6 +3,11 @@ html.bx-media-tablet {
+.bx-media-tablet body::before {
+ content: 'tablet';
.bx-media-tablet .bx-def-media-tablet-hide {