Skip to content

Commit

Permalink
Update custom-button.ts.
Browse files Browse the repository at this point in the history
  • Loading branch information
abdulla-ashurov committed Aug 28, 2023
1 parent 9bf6ebe commit d09bba8
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/static/custom-button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@ window.addEventListener('load', function () {
auth_pan.classList.add('auth-wrapper', 'wrapper');
auth_pan.appendChild(login_button);

const auth_div = document.getElementsByClassName('swagger-ui')[1].children[1];
if (auth_div) {
const child = auth_div.children[1];
child.insertAdjacentElement('beforebegin', auth_pan);
const info_div = document.getElementsByClassName('information-container')[0];
if (info_div) {
info_div.insertAdjacentElement('afterend', auth_pan);
}

isAuthenticated().then(function (value) {
Expand Down

0 comments on commit d09bba8

Please sign in to comment.