Skip to content

Commit

Permalink
Refactored to not use JQuery
Browse files Browse the repository at this point in the history
  • Loading branch information
spitfire305 committed Apr 30, 2024
1 parent 30b58e2 commit b87fc29
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions resources/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,14 @@ $(document).ready(function() {
});

function checkAds() {
var element = $('#ad-client');
if (element.length > 0) {
let url = element.attr('src');
var element = document.getElementById('ad-client');
if (element) {
let url = element.src;
fetch(url, {headers: {'X-Requested-With': 'XMLHttpRequest'}})
.catch( $('#subscription-encouragement').show());
}
}

/**
* Initiate spectrum for the various fields
*/
Expand Down

0 comments on commit b87fc29

Please sign in to comment.