Skip to content

Commit 2cd0208

Browse files
committed
Disabled links in iframes
1 parent fc87d25 commit 2cd0208

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

resources/views/studio/links.blade.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,4 +152,7 @@
152152
<center><iframe allowtransparency="true" id="frPreview2" style=" border-radius:0.25rem !important; background: #FFFFFF; min-height:600px; height:100%; width:100% !important;" class='w-100' src="{{ url('') }}/@<?= Auth::user()->littlelink_name ?>">Your browser isn't compatible</iframe></center>
153153
</div>
154154
</section>
155+
156+
<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
157+
<script type="text/javascript">$("iframe").load(function() { $("iframe").contents().find("a").each(function(index) { $(this).on("click", function(event) { event.preventDefault(); event.stopPropagation(); }); }); });</script>
155158
@endsection

resources/views/studio/theme.blade.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,4 +428,7 @@ class Accordion {
428428
@endif
429429

430430
@endforeach
431+
432+
<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
433+
<script type="text/javascript">$("iframe").load(function() { $("iframe").contents().find("a").each(function(index) { $(this).on("click", function(event) { event.preventDefault(); event.stopPropagation(); }); }); });</script>
431434
@endsection

0 commit comments

Comments
 (0)