|
|
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> |
| <html>
| |
| <p id="p1">{{#widget:Iframe|url=https://bnbforms.com/103014/|width=700|height=700|border=0}}</p>
| |
| <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.getElementById("p1").innerHTML = "<iframe src=\"<!--{$url|validate:url|escape:html|regex_replace:\"#^(?!(https?:)?//).*#i\":''}-->\" style=\"border: <!--{$border|escape:html|default:1}-->\" width=\"<!--{" + 700 + "|escape:html|default:400}-->\" height=\"<!--{$height|escape:html|default:300}-->\"></iframe>";
| |
| } else {
| |
| document.getElementById("p1").innerHTML = "<iframe src=\"<!--{$url|validate:url|escape:html|regex_replace:\"#^(?!(https?:)?//).*#i\":''}-->\" style=\"border: <!--{$border|escape:html|default:1}-->\" width=\"<!--{" + 300 + "|escape:html|default:300}-->\" height=\"<!--{$height|escape:html|default:300}-->\"></iframe>";
| |
| }
| |
| </script></html>
| |
| </includeonly> | | </includeonly> |