Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spike: Support widget in the support site #1330

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

dallasread
Copy link
Member

@dallasread dallasread commented Dec 19, 2024

Load up a support widget on an empty page in dev mode with hot-reloading, etc:

yarn support-widget

You can add the support widget on any website (with a permitted csp policy):

const $div = document.createElement('div')
$div.id = 'support-widget'
document.body.appendChild($div);

const $script = document.createElement('script');
$script.type = 'text/javascript';
$script.src = `https://deploy-preview-1330--dnsimple-support.netlify.app/support/widget.umd.js`;

document.getElementsByTagName('head')[0].appendChild($script);

We should run prettier on this if we go ahead.

@dallasread dallasread added the javascript Pull requests that update Javascript code label Dec 19, 2024
@dallasread dallasread self-assigned this Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
javascript Pull requests that update Javascript code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant