Skip to content

Commit

Permalink
v8.0.10
Browse files Browse the repository at this point in the history
  • Loading branch information
boehlerlukas committed Sep 13, 2022
1 parent 38bbe95 commit f5b8f93
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 7 deletions.
2 changes: 1 addition & 1 deletion build/index.js

Large diffs are not rendered by default.

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 setMaxNetworkRequests(maxRequests: number): void;
function registerCustomAction(
customAction: (action: { name: string }) => void
): void;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gleap",
"version": "8.0.9",
"version": "8.0.10",
"main": "build/index.js",
"scripts": {
"start": "webpack serve",
Expand Down
1 change: 1 addition & 0 deletions published/8.0.10/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.

13 changes: 10 additions & 3 deletions src/Gleap.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class Gleap {
static silentCrashReportSent = false;
initialized = false;
offlineMode = false;

// Global data
globalData = {
screenRecordingData: null,
Expand Down Expand Up @@ -78,7 +78,7 @@ class Gleap {
* Sets the development environment
* @param {*} environment
*/
static setEnvironment(environment) {
static setEnvironment(environment) {
GleapMetaDataManager.getInstance().environment = environment;
}

Expand Down Expand Up @@ -158,7 +158,7 @@ class Gleap {
GleapNotificationManager.getInstance().clearAllNotifications(true);
GleapSession.getInstance().clearSession(0, false);
}

/**
* Indentifies the user session
* @param {string} userId
Expand Down Expand Up @@ -194,6 +194,13 @@ class Gleap {
GleapFrameManager.getInstance().hideWidget();
}

/**
* Sets the maximum network request count.
*/
static setMaxNetworkRequests(maxRequests) {
GleapNetworkIntercepter.getInstance().setMaxRequests(maxRequests);
}

/**
* Closes any open Gleap dialogs.
*/
Expand Down
5 changes: 4 additions & 1 deletion src/GleapNetworkIntercepter.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ class GleapNetworkIntercepter {
}

setMaxRequests(maxRequests) {
if (maxRequests > 50) {
maxRequests = 50;
}
this.maxRequests = maxRequests;
}

Expand Down Expand Up @@ -176,7 +179,7 @@ class GleapNetworkIntercepter {

cleanupContentSize(text) {
const contentSize = this.getTextContentSize(text);
if (contentSize > 0.2) {
if (contentSize > 0.15) {
return "<content_too_large>";
}

Expand Down

0 comments on commit f5b8f93

Please sign in to comment.