Skip to content

Commit

Permalink
Merge pull request #58 from dunxd/util.js-to-ES5
Browse files Browse the repository at this point in the history
Util.js to es5
  • Loading branch information
mikespub committed Sep 26, 2023
2 parents 307ae5a + 55630f5 commit d34a129
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion util.js
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,8 @@ $(document).on("keydown", function(e){
});

/*exported initiateAjax */
function initiateAjax (url, theme, templates = 'templates') {
function initiateAjax (url, theme, templates) {
templates = typeof templates !== 'undefined' ? templates : 'templates';
$.when($.get(templates + '/' + theme + '/header.html'),
$.get(templates + '/' + theme + '/footer.html'),
$.get(templates + '/' + theme + '/bookdetail.html'),
Expand Down Expand Up @@ -546,6 +547,7 @@ function initiateAjax (url, theme, templates = 'templates') {

/** Moved from util.js to twigged cops.js due to unknown issue with Kindle - see #36
function initiateTwig(url, theme, templates = 'templates') {
templates = typeof templates !== 'undefined' ? templates : 'templates';
Twig.extendFunction("str_format", str_format);
Twig.extendFunction("asset", asset);
Expand Down

0 comments on commit d34a129

Please sign in to comment.