New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@revium/gpt-widget

Package Overview
Dependencies
Maintainers
3
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@revium/gpt-widget

`cp .env.example .env.local`

latest
npmnpm
Version
0.0.7-dev.0
Version published
Maintainers
3
Created
Source

Quickstart

cp .env.example .env.local

yarn

yarn dev

Deploy code

<script>
  function loadScript(url, callback) {
    let script = document.createElement('script')
    script.type = 'text/javascript'
    script.src = url
    script.onload = callback
    document.head.appendChild(script)

    let link = document.createElement('link')
    link.rel = 'stylesheet'
    link.href = 'https://cdn.jsdelivr.net/npm/@revium/gpt-widget@0.x.x/dist/style.css'
    document.head.appendChild(link)
  }

  // Function to initialize the widget after the script is loaded
  function initializeWidget() {
    if (typeof ReviumGptWidget !== 'undefined' && typeof ReviumGptWidget.init === 'function') {
      ReviumGptWidget.init({
        source: 'xxxxxxxx',
        apikey: 'xxxxxxxx',
        intro:
          'Im an AI chatbot built by the Revium team and trained on data you can find on this site, ask me anything about the website or future privacy laws!',
        textMode: 'light',
        primaryColor: '#000000',
        secondaryColor: '#000000',
        elementId: 'revium-gpt-widget',
      })
    } else {
      console.error('ReviumGptWidget is not defined or does not have an init() function.')
    }
  }

  // Load the external script
  loadScript('https://cdn.jsdelivr.net/npm/@revium/gpt-widget@0.x.x/dist/revium-gpt-widget.js', initializeWidget)
</script>

Minified

function loadScript(t,e){let i=document.createElement("script");i.type="text/javascript",i.src=t,i.onload=e,document.head.appendChild(i);let n=document.createElement("link");n.rel="stylesheet",n.href="https://cdn.jsdelivr.net/npm/@revium/gpt-widget@0.x.x/dist/style.css",document.head.appendChild(n)}function initializeWidget(){"undefined"!=typeof ReviumGptWidget&&"function"==typeof ReviumGptWidget.init?ReviumGptWidget.init({source:"xxxxxxxx",apikey:"xxxxxxxx",intro:"Im an AI chatbot built by the Revium team and trained on data you can find on this site, ask me anything about the website or future privacy laws!",textMode:"light",primaryColor:"#000000",secondaryColor:"#000000"}):console.error("ReviumGptWidget is not defined or does not have an init() function.")}loadScript("https://cdn.jsdelivr.net/npm/@revium/gpt-widget@0.x.x/dist/revium-gpt-widget.js",initializeWidget);

FAQs

Package last updated on 27 Oct 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts