Skip to content

Commit

Permalink
v11.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
boehlerlukas committed Aug 8, 2023
1 parent 706e9c2 commit 2f2061f
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 6 deletions.
2 changes: 1 addition & 1 deletion build/index.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions demo/main.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const Gleap = window.Gleap;

Gleap.setFrameUrl("http://0.0.0.0:3001");
Gleap.setApiUrl("http://0.0.0.0:9000");
//Gleap.setFrameUrl("http://0.0.0.0:3001");
//Gleap.setApiUrl("http://0.0.0.0:9000");

Gleap.setDisablePageTracking(true);

Expand Down
1 change: 1 addition & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export namespace Gleap {
function isOpened(): boolean;
function setApiUrl(apiUrl: string): void;
function setFrameUrl(frameUrl: string): void;
function setBannerUrl(bannerUrl: string): void;
function setMaxNetworkRequests(maxRequests: number): void;
function registerCustomAction(
customAction: (action: { name: string }) => void
Expand Down
2 changes: 1 addition & 1 deletion published/11.1.0/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion published/latest/index.js

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions src/Gleap.js
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,14 @@ class Gleap {
GleapSession.getInstance().apiUrl = apiUrl;
}

/**
* Set a custom banner url.
* @param {string} bannerUrl
*/
static setBannerUrl(bannerUrl) {
GleapBannerManager.getInstance().setBannerUrl(bannerUrl);
}

/**
* Set a custom frame api url.
* @param {string} frameUrl
Expand Down
6 changes: 5 additions & 1 deletion src/GleapBannerManager.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Gleap from "./Gleap";

export default class GleapBannerManager {
bannerUrl = "http://localhost:5173";
bannerUrl = "https://outboundmedia.gleap.io";
bannerContainer = null;
bannerData = null;

Expand All @@ -18,6 +18,10 @@ export default class GleapBannerManager {
this.startCommunication();
}

setBannerUrl(url) {
this.bannerUrl = url;
}

startCommunication() {
// Add window message listener.
window.addEventListener("message", (event) => {
Expand Down

0 comments on commit 2f2061f

Please sign in to comment.