natemonseu Posted December 13, 2022 Share Posted December 13, 2022 Hello -- Hoping someone may be able to help me with getting a web widget to appear. Code provided below. Each time I save the page with the code block, I'm getting the "Scripts Disabled" error. I've done everything I've read to do, and still can't get the web widget to populate (it's just showing as blank). Steps to try and resolve the issue: added the code to the "header section" of the code injection page Made sure code was tied to proper libraries Open an private browsing tab to view the webpage Here is the code for the widget I am working with. Any help getting this to work is greatly appreciated. <script src="https://code.jquery.com/jquery-3.5.1.min.js"></script><script src="https://unpkg.com/@openai/chat-widget@latest/dist/chat-widget.js"></script><div id="chat-widget-container"></div><script> var chatWidget = new ChatWidget({ apiKey: 'YOUR_API_KEY', // Replace with your own API key targetElement: '#chat-widget-container', prompt: 'Welcome to the resume formatting tool! Please input a sentence from your resume, and I will suggest ways to improve its formatting.', inputPlaceholder: 'Enter a sentence from your resume...', }); </script> Link to comment
paul2009 Posted December 13, 2022 Share Posted December 13, 2022 18 minutes ago, natemonseu said: Each time I save the page with the code block, I'm getting the "Scripts Disabled" error. I'm assuming that you added a genuine API KEY after taking the screenshots? If yes, please include a working link to the page so we can see the code in action. If you're unsure how to do this, please see How to Post a Forum Question. Did this help? Please give feedback by clicking an icon below ⬇️ About: SQSP User for 17 yrs. Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥. Work: Founder of SF Digital, building Squarespace Extensions to supercharge your commerce website. Content: Links in my posts may refer to SF Digital products or may be affiliate links. If my advice helped, you can thank me by clicking one of the feedback emojis below. I love coffee too. Link to comment
natemonseu Posted December 14, 2022 Author Share Posted December 14, 2022 (edited) Yes @paul2009! Updated with a genuine API code. Below is a working link to the page. https://dory-trumpet-c96m.squarespace.com/code Thank you Edited December 14, 2022 by natemonseu Link to comment
creedon Posted December 14, 2022 Share Posted December 14, 2022 The source URL in the following code appears not to exist. <script src="https://unpkg.com/@openai/chat-widget@latest/dist/chat-widget.js"></script> I'm thinking you might be following some old install instructions. Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects. Link to comment
natemonseu Posted December 14, 2022 Author Share Posted December 14, 2022 Thanks @creedon! I'll look into this 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