Skip to content
Merged
Changes from all commits
Commits
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
14 changes: 11 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,17 @@
(function(){
try {
if (window.polliLib) {
// Use a stable referrer for API tiering; avoid hardcoding endpoints elsewhere
window.polliLib.configure({ referrer: 'unityailab.com' });
window.polliClient = new window.polliLib.PolliClientWeb({ referrer: 'unityailab.com' });
// Derive base referrer from attribute or window location (no path segments)
const cur = document.currentScript;
const attrRef = cur && cur.getAttribute('data-referrer');
let base = window.location.origin;
if (attrRef) {
// Support values missing protocol by resolving against window.location.origin
try { base = new URL(attrRef, window.location.origin).origin; } catch {}
}
const referrer = base.endsWith('/') ? base : base + '/';
window.polliLib.configure({ referrer });
window.polliClient = window.polliLib.getDefaultClient();

// Provide basic helpers used by image features
if (!window.randomSeed) {
Expand Down
Loading