Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
476d9dc
fix: get the script by id instead of depending on document.currentScr…
creativeindustriesgroup Jul 21, 2025
98b8853
fix: ensure backwards compatibility
creativeindustriesgroup Aug 4, 2025
94d1f6c
fix: typo
creativeindustriesgroup Aug 4, 2025
2bcb958
Merge branch 'develop' into fix/05/better-widget-src-handling
creativeindustriesgroup Aug 4, 2025
385ecba
fix: improper formatting issues
creativeindustriesgroup Aug 10, 2025
83dab54
Merge branch 'HiEventsDev:develop' into fix/05/better-widget-src-hand…
creativeindustriesgroup Aug 27, 2025
055d902
Fix: Adjust event stats after order cancellation (#729)
daveearley Aug 28, 2025
1dedfbe
Merge branch 'develop' into fix/05/better-widget-src-handling
creativeindustriesgroup Aug 29, 2025
b6bdb65
Fix custom branding logos (#745)
creativeindustriesgroup Aug 31, 2025
14e1562
Add order level questions and answers to Attendee Export. (#719)
sundeepnarang Aug 31, 2025
759ae6c
Feature: Customer event emails (#748)
daveearley Aug 31, 2025
ea53081
Logout doesnt wait for api call, refirects to login and fails to logo…
sundeepnarang Aug 31, 2025
b5c2a8f
Require Stripe account to enable messaging (#749)
daveearley Aug 31, 2025
a2a6d14
Support multiple stripe platforms (#750)
daveearley Sep 2, 2025
90e0b48
Add support for 2D barcode scanners in check-in app (#751)
daveearley Sep 2, 2025
16dc0ed
Require Stripe account to enable messaging (#752)
daveearley Sep 2, 2025
24e8a2f
Fix height of collapses products on event page (#756)
daveearley Sep 4, 2025
aa9a107
Fix attendee name validation (#755)
daveearley Sep 4, 2025
5bc7034
Ignore taxes and fees for free orders (#754)
daveearley Sep 4, 2025
b0bcb86
Feature: Ticket Designer (Ticket branding, logo and disclaimer suppor…
daveearley Oct 1, 2025
5a70de0
Feature: Stripe migration (#805)
daveearley Oct 9, 2025
a47db64
Translation: Add Turkish locales (#679)
Ardakilic Oct 9, 2025
f29db91
Fix: Organizer homepage UI tweaks (#806)
daveearley Oct 10, 2025
1060882
Fix: Organizer contact form for logged out users (#807)
daveearley Oct 10, 2025
c3056c5
Fix: Events for other organizers not showing (#808)
daveearley Oct 10, 2025
d04a91b
Merge branch 'v1.2.0-alpha.1' into fix/05/better-widget-src-handling
daveearley Oct 10, 2025
d90650a
Merge branch 'develop' into fix/05/better-widget-src-handling
daveearley Oct 23, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions frontend/public/widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,14 @@
const loadWidget = () => {
window.hiEventWidgetLoaded = true;

let scriptOrigin;
let scriptOrigin;
try {
const scriptURL = document.currentScript.src;
scriptOrigin = new URL(scriptURL).origin;
let script = document.currentScript;
if (!script) {
script = document.getElementById('hievents-widget-script');
}```
if (!script || !script.src) throw new Error('HiEvent widget error: Invalid script URL');
scriptOrigin = new URL(script.src).origin;
} catch (e) {
console.error('HiEvent widget error: Invalid script URL');
return;
Expand Down
30 changes: 15 additions & 15 deletions frontend/src/components/common/WidgetEditor/index.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import classes from './WidgetEditor.module.scss';
import { t, Trans } from "@lingui/macro";
import { ColorInput, Group, NumberInput, Switch, Tabs, Textarea, TextInput } from "@mantine/core";
import { matches, useForm } from "@mantine/form";
import { IconInfoCircle } from "@tabler/icons-react";
import { useEffect, useState } from "react";
import { useParams } from "react-router";
import { useGetEvent } from "../../../queries/useGetEvent.ts";
import { useGetEventSettings } from "../../../queries/useGetEventSettings.ts";
import { Event } from '../../../types.ts';
import SelectProducts from "../../routes/product-widget/SelectProducts";
import {ColorInput, Group, NumberInput, Switch, Tabs, Textarea, TextInput} from "@mantine/core";
import {t, Trans} from "@lingui/macro";
import {matches, useForm} from "@mantine/form";
import {useEffect, useState} from "react";
import {CopyButton} from "../CopyButton";
import {useParams} from "react-router";
import {IconInfoCircle} from "@tabler/icons-react";
import {useGetEventSettings} from "../../../queries/useGetEventSettings.ts";
import {Popover} from "../Popover";
import {LoadingMask} from '../LoadingMask';
import {Event} from '../../../types.ts';
import {useGetEvent} from "../../../queries/useGetEvent.ts";
import {Card} from "../Card";
import { Card } from "../Card";
import { CopyButton } from "../CopyButton";
import { LoadingMask } from '../LoadingMask';
import { Popover } from "../Popover";
import classes from './WidgetEditor.module.scss';

export const WidgetEditor = () => {
const {eventId} = useParams();
Expand Down Expand Up @@ -46,7 +46,7 @@ export const WidgetEditor = () => {
const [reactUsageCode, setReactUsageCode] = useState<string>("");
const currentLocation = typeof window !== "undefined" ? window?.location : undefined;
const embedUrl = `${currentLocation?.protocol}//${currentLocation?.host}/widget.js`;
const embedScript = `<script async src="${embedUrl}"></script>`;
const embedScript = `<script id="hievents-widget-script" async src="${embedUrl}"></script>`;

useEffect(() => {
setHtmlEmbedCode(
Expand Down
7 changes: 4 additions & 3 deletions frontend/src/embed/widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
const loadWidget = () => {
window.hiEventWidgetLoaded = true;

let scriptOrigin;
let scriptOrigin;
try {
const scriptURL = scriptElement.src;
scriptOrigin = new URL(scriptURL).origin;
const script = document.getElementById('hievent-widget-script');
if (!script || !script.src) throw new Error('HiEvent widget error: Invalid script URL');
scriptOrigin = new URL(script.src).origin;
} catch (e) {
console.error('HiEvent widget error: Invalid script URL');
return;
Expand Down