Hello,
I recently had to add a few js scripts (third party widgets) to a site and noticed that they broke cornerstone’s preview. it didn’t break the site, per se but i couldn’t even see what i was doing because the js script messed up all the preview of the site.
the script is a normal widget from book a table and looks like this:
<!-- Start Bookatable Code -->
<script type="text/javascript" src="https://bda.bookatable.com/deploy/lbui.direct.min.js"></script>
<script type="text/javascript">
LBDirect_Embed({
connectionid : "ID_GOES HERE",
style : {
baseColor : "000000"}
});
</script>
<!-- End Bookatable Code -->
(I changed the connectionid for privacy purposes, that is NOT the issue).
the site works ok, but the cornerstone preview stopped working, it looks all broke right from the part the JS script is added.
this has happened to me a few times before, and never bothered to ask because it’s not a huge problem, but now i’m wondering if i’m doing something wrong.
Just to clarify, i want to know what is the best practice when adding third party JS code like the one above to a pro site, i’m clearly doing it wrong because the preview stops previewing pretty much everything and i have to end up working in skeleton mode.
Thanks in advance!