> For the complete documentation index, see [llms.txt](https://developers.socialboards.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.socialboards.com/docs/apis/support-widget/full-script-example.md).

# Full script example

This example contains some text tweaks for our Norwegian customers.

```
<!DOCTYPE html>
<html lang="en">
   <head>
      <meta charset="utf-8" />
      <title>Magic Widget Example file</title>
   </head>
   <body>
      <script type="text/javascript">
         var scriptElement = document.createElement("script");
         scriptElement.async = 1;
         scriptElement.src = "https://magicwidget.socialboards.com/magic-widget.js";
         document.body.appendChild(scriptElement);
      </script>
      <script type="text/javascript">
          window.magicWidgetAsyncInit = function() {
          
              var configuration = {
                 community: 'demo',
                 moduleMask: 7,
                 messenger: {
                     right: '20px',
                     bottom: '85px',
                     animationDirection: 'right-to-left',
                     translate: '20px',
                     
                     home: {
                         logoDimensions: { width: '150px' },
                         chatLink: {
                             order: 1,
                             startChatText: 'Start Chat-Samtale',
                             continueChatText: 'Fortsett Chat samtale' 
                         },
                         faqLink: {
                             order: 0,
                             text: 'Ofte stilte spørsmål' 
                         },
                         formLink: {
                             order: 2,
                             text: 'Send e-post via skjema' 
                         }
                     },
                     
                     faq: {
                         faqCategoryId: null,
                         faqName: 'demo',
                     },
         
                     form: {
                         formName: 'demo'
                     },
         
                     chat: {
                         authenticationMask: 2,
                         agentMessageBackgroundColor: '#fefefe',
                         botMessageBackgroundColor: '#ffffff'
                     } 
                 },
             
                 launcher: {
                     enabled: true,
                     height: '45px',
                     width: '45px',
                     right: '20px',
                     bottom: '5px',
                     launchIcon: 'https://socialboardsbproduction.blob.core.windows.net/123/1029879c-8f6f-4371-ae15-fbe4110931f4.png',
                     dismissIcon: 'https://socialboardsbproduction.blob.core.windows.net/123/69327153-a772-4a43-a357-be3b97da0424.png'
                 }
             };
             
             magicWidget.initializeAsync(configuration)
                 .then(function() {
                     
                     // ready!
                     magicWidget.launchAsync();
                 })
                 .catch(function(error) {
                     
                     // something went wrong...
                     console.error(error);
                 });
                 
             magicWidget.isLaunched$.subscribe(function(isLaunched) {
                 
                 console.log("widget messenger window is launched: " + isLaunched);
             });
          };
      </script>
   </body>
</html>
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developers.socialboards.com/docs/apis/support-widget/full-script-example.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
