Skip to content

Commit

Permalink
Fix for issue aFarkas#972 - Fires the callback function if script alr…
Browse files Browse the repository at this point in the history
…eady loaded
  • Loading branch information
JamesToothill committed Nov 7, 2022
1 parent 1523a4f commit 7fd4466
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions plugins/unveilhooks/ls.unveilhooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,9 @@ For background images, use data-bg attribute:

function addStyleScript(src, style, cb){
if(uniqueUrls[src]){
if (typeof cb === 'function') {
cb();
}
return;
}
var elem = document.createElement(style ? 'link' : 'script');
Expand Down
2 changes: 1 addition & 1 deletion plugins/unveilhooks/ls.unveilhooks.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7fd4466

Please sign in to comment.