Skip to content

Commit 6afe36a

Browse files
author
Lukas Böhler
committed
v1.0.3
1 parent fc3b36d commit 6afe36a

File tree

6 files changed

+29
-10
lines changed

6 files changed

+29
-10
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
## BugBattle JavaScript SDK
22
Achieve better app quality & ratings with comprehensive in-app bug reporting. BugBattle offers affordable In-App Bug Reporting for Apps, WebApps & Websites.
33

4+
## ❤️ Demo
5+
6+
[https://jssdk.bugbattle.io/demo](https://jssdk.bugbattle.io/demo)
7+
48
## ⭐️ Features
59

610
- Plain and instant setup
@@ -60,6 +64,20 @@ bugBattle.setCustomData({
6064
});
6165
```
6266

67+
## 🤠 Activation methods
68+
69+
Currently you can choose between two activation methods, that initiate the bug reporting workflow.
70+
71+
a.) BugBattle.FEEDBACK_BUTTON - this will add a feedback bottom to the page
72+
b.) BugBattle.NONE - this allows you to manually trigger the bug reporting workflow
73+
74+
If you want to manually trigger the bug reporting workflow, simply call the following method:
75+
76+
```
77+
// Initiates the bug reporting workflow.
78+
bugBattle.reportBug();
79+
```
80+
6381
## 🤝 Need help?
6482

6583
We are here to help! hi@bugbattle.io

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.

build/index.js.map

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

published/v1.0.3/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.

published/v1.0.3/index.js.map

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/lib/BugBattle.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -212,13 +212,14 @@ class BugBattle {
212212
init() {
213213
this.overwriteConsoleLog();
214214

215-
window.onload = function () {
216-
if (this.activation === BugBattle.SHAKE) {
217-
218-
} else if (this.activation === BugBattle.FEEDBACK_BUTTON) {
219-
this.injectFeedbackButton();
215+
let self = this;
216+
document.addEventListener("DOMContentLoaded", function(event) {
217+
if (self.activation === BugBattle.SHAKE) {
218+
219+
} else if (self.activation === BugBattle.FEEDBACK_BUTTON) {
220+
self.injectFeedbackButton();
220221
}
221-
}
222+
});
222223
}
223224

224225
injectFeedbackButton() {

0 commit comments

Comments
 (0)