Skip to content

Commit f088915

Browse files
committed
Added smart links.
1 parent e407f25 commit f088915

File tree

6 files changed

+15
-10
lines changed

6 files changed

+15
-10
lines changed

build/cjs/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.

build/esm/index.mjs

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

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": "13.6.0",
3+
"version": "13.6.1",
44
"main": "build/cjs/index.js",
55
"module": "build/esm/index.mjs",
66
"exports": {

published/13.6.1/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: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1185,17 +1185,21 @@ if (typeof window !== "undefined") {
11851185

11861186
const handleGleapLink = (href) => {
11871187
try {
1188-
// gleap://article/123
11891188
const urlParts = href.split('/');
11901189
const type = urlParts[2];
11911190
if (type === 'article') {
11921191
const identifier = urlParts[3];
1193-
Gleap.openHelpCenterArticle(identifier);
1192+
Gleap.openHelpCenterArticle(identifier, true);
11941193
}
11951194

11961195
if (type === 'collection') {
11971196
const identifier = urlParts[3];
1198-
Gleap.openHelpCenterCollection(identifier);
1197+
Gleap.openHelpCenterCollection(identifier, true);
1198+
}
1199+
1200+
if (type === 'flow') {
1201+
const identifier = urlParts[3];
1202+
Gleap.startFeedbackFlow(identifier, true);
11991203
}
12001204

12011205
if (type === 'survey') {
@@ -1205,17 +1209,17 @@ const handleGleapLink = (href) => {
12051209

12061210
if (type === 'bot') {
12071211
const identifier = urlParts[3];
1208-
Gleap.startBot(identifier);
1212+
Gleap.startBot(identifier, true);
12091213
}
12101214

12111215
if (type === 'news') {
12121216
const identifier = urlParts[3];
1213-
Gleap.openNews(identifier);
1217+
Gleap.openNewsArticle(identifier, true);
12141218
}
12151219

12161220
if (type === 'checklist') {
12171221
const identifier = urlParts[3];
1218-
Gleap.startChecklist(identifier);
1222+
Gleap.startChecklist(identifier, true);
12191223
}
12201224

12211225
if (type === 'tour') {

0 commit comments

Comments
 (0)