Skip to content

Commit

Permalink
Revert "Fix webinar-join lint issues since it's in assets"
Browse files Browse the repository at this point in the history
This reverts commit c1f5338.
  • Loading branch information
nattsw committed Jul 25, 2023
1 parent c1f5338 commit 018e5d7
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions assets/javascripts/webinar-join.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/* global ZoomMtg:true */

window.onload = () => {
window.onload = (event) => {
(function () {
document.querySelector(".d-header").style.display = "none";

Expand Down Expand Up @@ -28,6 +26,7 @@ window.onload = () => {
request.onload = function () {
if (this.status >= 200 && this.status < 400) {
let res = JSON.parse(this.response);
console.log(res);
ZoomMtg.init({
leaveUrl: res.topic_url,
isSupportAV: true,
Expand All @@ -42,8 +41,9 @@ window.onload = () => {
sdkKey: res.sdk_key,
userEmail: res.email,
passWord: res.password || "",
success: () => {},
error: (join_result) => {
success: function (res) {},
error: function (join_result) {
console.log(join_result);
if (join_result.errorCode === 1) {
const params = getParams(window.location.href);
if (params.fallback) {
Expand All @@ -58,11 +58,14 @@ window.onload = () => {
},
});
},
error: () => {},
error: function (res) {
console.log("error generating signature");
},
});
} else {
// eslint-disable-next-line no-console
console.error();
console.error(
"error getting webinar signature from discourse-zoom plugin"
);
}
};

Expand Down

0 comments on commit 018e5d7

Please sign in to comment.