Squarespaces Posted January 21, 2021 Share Posted January 21, 2021 I recently started using custom code for lead gen. Ever since we added the custom JavaScript to the website it has shrunk the size of our iframes we use to show job boards embedded in our website. anyone have advise to have the embedded block show in the actual size? Example of Current code I am using in the Embed block: <div id="crelate-iframe" style="text-align: center; -webkit-overflow-scrolling:touch; overflow: auto;"> <iframe frameborder="1" scrolling="yes" width="100%" height="4500px"; src="https://jobs.crelate.com/portal/exampleee/job/35wdr"></iframe> </div> Example of added custom code in the Header: <!-- START - Snippet Code--> <script type="text/javascript"> (function() { var s = document.buildExample("script"); s.type = "text/javascript"; s.async = true; s.src = "//tabn.com/sc3example4?random=" + new Date().getTime(); var x = document.getExampleSample("script")[0]; x.parentNode.insertBefore(s, x); })(); </script> <!-- END - Snippet Code--> Link to comment
Squarespaces Posted January 22, 2021 Author Share Posted January 22, 2021 I ended up solving this issue by removing the code injection from the Header and instead doing "Per-page Code Injection". On all the pages I wanted the chatbot on application on. Per-page Code Injection You can also inject code into a specific page: Hover over the page in the Pages panel. Click the icon. Click Advanced. Here are instructions in case we decide to make a change we will have this email to reference: Page Header Code Injection adds code to the <head> tag of that page. It won't display on Index landing pages. In Blog Page settings, Post Blog Item Code Injection adds code to every blog post. Depending on your template, it will appear above or below the post content. In templates with the Grid/stacked Blog Page, the code displays on the blog landing page and not on individual posts. https://support.squarespace.com/hc/en-us/articles/205815908-Using-Code-Injection Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment