Actions

Widget

Iframe: Difference between revisions

From OSE

No edit summary
Tag: Reverted
No edit summary
Tag: Manual revert
Line 1: Line 1:


<includeonly>
<includeonly><iframe src="<!--{$url|validate:url|escape:html|regex_replace:"#^(?!(https?:)?//).*#i":''}-->" style="border: <!--{$border|escape:html|default:1}-->" width="<!--{$width|escape:html|default:400}-->" height="<!--{$height|escape:html|default:300}-->"></iframe></includeonly>
<script type="text/javascript">
function getDeviceType() {
  const userAgent = navigator.userAgent.toLowerCase();
 
  if (userAgent.includes('mobile') || userAgent.includes('android') || userAgent.includes('iphone') || userAgent.includes('ipad')) {
    return 'mobile';
  } else if (userAgent.includes('tablet')) {
    return 'tablet';
  } else {
    return 'desktop';
  }
}
if (getDeviceType() === "desktop") {
//        document.write("{{#widget:Iframe|url=https://bnbforms.com/103014/|width=600|height=700|border=0}}");
        $width=600;
} else {
//        document.write("{{#widget:Iframe|url=https://bnbforms.com/103014/|width=300|height=700|border=0}}");
$width = 300;
}
</script>
<iframe src="<!--{$url|validate:url|escape:html|regex_replace:"#^(?!(https?:)?//).*#i":''}-->" style="border: <!--{$border|escape:html|default:1}-->" width="<!--{$width|escape:html|default:400}-->" height="<!--{$height|escape:html|default:300}-->"></iframe></includeonly>

Revision as of 00:45, 31 May 2025