Skip to content

Commit ebb5c7d

Browse files
committed
v7.0.9
1 parent ff8e99d commit ebb5c7d

File tree

10 files changed

+20
-40
lines changed

10 files changed

+20
-40
lines changed

build/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo/main.js

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
const Gleap = window.Gleap;
22

3-
Gleap.initialize("DUPaIr7s689BBblcFI4pc5aBgYJTm7Sc");
4-
5-
/*Gleap.identify("123338", {
6-
email: "lukas+test@gleap.io",
7-
name: "Lukas",
8-
}, "232310140176f44725d35f8191b51bd8821f41dba9b4c3cfab409721feadb4fb");*/
3+
Gleap.setApiUrl("http://localhost:9000");
4+
Gleap.initialize("ogWhNhuiZcGWrva5nlDS8l7a78OfaLlV");
95

106
Gleap.attachCustomData({
117
mission: "Unicorn",
@@ -16,11 +12,13 @@ Gleap.attachCustomData({
1612
},
1713
});
1814

15+
// Register custom action.
1916
Gleap.registerCustomAction((customAction) => {
20-
console.log("MAGIC??");
17+
console.log("Custom action called:");
2118
console.log(customAction);
2219
});
2320

21+
// Network logs test.
2422
setTimeout(() => {
2523
console.log("Loading place infos");
2624

@@ -37,17 +35,4 @@ setTimeout(() => {
3735
xmlhttp.send();
3836

3937
Gleap.preFillForm("bqfp3v", "DIES IST EIN TEST");
40-
}, 1000);
41-
42-
setTimeout(() => {
43-
console.warn("Demo warning :)");
44-
console.log("Data will be loaded soon.");
45-
46-
// xxx();
47-
}, 4000);
48-
49-
const files = [
50-
"https://biblephrasesm31p70v.blob.core.windows.net/phrases-v2/CD17C8A4CF4FA179C864FA4EFA561BBC405EF06304B1E239EE1A3A781A8905A0.mpga",
51-
"https://biblephrasesm31p70v.blob.core.windows.net/phrases-v2/CD17C8A4CF4FA179C864FA4EFA561BBC405EF06304B1E239EE1A3A781A8905A0.mpga",
52-
"https://reqres.in/api/products/3",
53-
];
38+
}, 1000);

index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export namespace Gleap {
2424
function clearCustomData(): void;
2525
function isOpened(): boolean;
2626
function setApiUrl(apiUrl: string): void;
27-
function setWidgetUrl(widgetUrl: string): void;
27+
function setFrameUrl(frameUrl: string): void;
2828
function registerCustomAction(
2929
customAction: (action: { name: string }) => void
3030
): void;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gleap",
3-
"version": "7.0.8",
3+
"version": "7.0.9",
44
"main": "build/index.js",
55
"scripts": {
66
"start": "webpack serve",

published/7.0.9/index.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

published/latest/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Gleap.js

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -245,11 +245,11 @@ class Gleap {
245245
}
246246

247247
/**
248-
* Set a custom widget api url.
249-
* @param {string} widgetUrl
248+
* Set a custom frame api url.
249+
* @param {string} frameUrl
250250
*/
251-
static setWidgetUrl(widgetUrl) {
252-
GleapSession.getInstance().widgetUrl = widgetUrl;
251+
static setFrameUrl(frameUrl) {
252+
GleapFrameManager.getInstance().frameUrl = frameUrl;
253253
}
254254

255255
/**
@@ -369,13 +369,8 @@ class Gleap {
369369
newFormData.reportedBy = sessionInstance.session.email;
370370
}
371371

372-
GleapEventManager.notifyEvent("sending-silent-report");
373372
const feedback = new GleapFeedback("CRASH", priority, newFormData, true, excludeData ? excludeData : {});
374-
feedback.sendFeedback().then(() => {
375-
GleapEventManager.notifyEvent("silent-report-sent");
376-
}).catch((error) => {
377-
GleapEventManager.notifyEvent("failed-sending-silent-report");
378-
});
373+
feedback.sendFeedback().then(() => { }).catch((error) => { });
379374
}
380375

381376
/**

src/GleapConfigManager.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export default class GleapConfigManager {
4949
const http = new XMLHttpRequest();
5050
http.open(
5151
"GET",
52-
session.widgetUrl + "/widget/" + session.sdkKey + "/config"
52+
session.apiUrl + "/config/" + session.sdkKey
5353
);
5454
http.setRequestHeader("Content-Type", "application/json;charset=UTF-8");
5555
session.injectSession(http);

src/GleapFrameManager.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import { GleapStreamedEvent, GleapCustomActionManager, GleapEventManager, GleapMarkerManager, GleapFeedback, GleapFeedbackButtonManager, GleapTranslationManager, GleapSession, GleapConfigManager } from "./Gleap";
22

33
export default class GleapFrameManager {
4+
frameUrl = "https://frame.gleap.io";
45
gleapFrameContainer = null;
56
gleapFrame = null;
67
injectedFrame = false;
78
widgetOpened = false;
89
listeners = [];
9-
frameURL = "https://frame.gleap.io";
1010
markerManager = undefined;
1111
escListener = undefined;
1212
frameHeight = 0;
@@ -57,7 +57,7 @@ export default class GleapFrameManager {
5757

5858
var elem = document.createElement("div");
5959
elem.className = "gleap-frame-container gleap-frame-container--hidden gleap-hidden";
60-
elem.innerHTML = `<div class="gleap-frame-container-inner"><iframe src="${this.frameURL}" class="gleap-frame" scrolling="yes" title="Gleap Widget Window" allow="autoplay; encrypted-media; fullscreen;" frameborder="0"></iframe></div>`;
60+
elem.innerHTML = `<div class="gleap-frame-container-inner"><iframe src="${this.frameUrl}" class="gleap-frame" scrolling="yes" title="Gleap Widget Window" allow="autoplay; encrypted-media; fullscreen;" frameborder="0"></iframe></div>`;
6161
document.body.appendChild(elem);
6262

6363
this.gleapFrameContainer = elem;
@@ -262,7 +262,7 @@ export default class GleapFrameManager {
262262

263263
// Add window message listener.
264264
window.addEventListener("message", (event) => {
265-
if (event.origin !== this.frameURL) {
265+
if (event.origin !== this.frameUrl) {
266266
return;
267267
}
268268

src/GleapSession.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { loadFromGleapCache, saveToGleapCache } from "./GleapHelper";
33

44
export default class GleapSession {
55
apiUrl = "https://api.gleap.io";
6-
widgetUrl = "https://widget.gleap.io";
76
sdkKey = null;
87
session = {
98
gleapId: null,

0 commit comments

Comments
 (0)