_includes/appscms/scripts/script.html in appscms-tools-theme-3.7.9 vs _includes/appscms/scripts/script.html in appscms-tools-theme-3.8.0

- old
+ new

@@ -1,135 +1,138 @@ {%- include adblocker.html -%} {% assign scriptData = - site.data.[page.folderName][lang][file] %} {%- assign dataAtt = - "data-folderName='$folderName' data-lang='$lang' data-fileName='$fileName' - data-tool='$tool'" -%} {%- assign $folderName = '$folderName' -%} {%- if - site.removeJquery != true -%} - <script - defer - src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js" - {%- - if - site.crossorigin - -%} - {{ - }} - crossorigin - {%- - endif - -%} - ></script> - {%- endif -%} - - <script defer src="/assets/js/theme.js" crossorigin="anonymous"></script> - {%- if site.userTrackingCount -%} {%- include customScripts.html -%} {%- endif - -%} {%- if site.userTrackingCount and page.layout == "feature" -%} - <script defer src="/assets/js/usageTracking.js"></script> - <script defer src="/assets/js/usageTrackingEvents.js"></script> - <script defer src="/assets/js/sharePage.js"></script> - {%- endif -%} {%- if site.removeBootstrapJs != true -%} - <script - defer="defer" - src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/js/bootstrap.bundle.min.js" - integrity="sha384-Piv4xVNRyMGpqkS2by6br4gNJ7DXjqk09RmUpJ8jgGtD7zP9yug3goQfGII0yAns" - crossorigin="anonymous" - ></script> - {%- endif -%} {{site.data.customcdns.customcdns.jsfiles}} {%- if - scriptData.jsfilepaths -%} {%- for path in scriptData.jsfilepaths -%} {%- assign - asset_dir = path -%} {%- if site.versioning and asset_dir != "" -%} {%- if - asset_dir contains "https" and asset_dir contains "https://" -%} - <script - defer - src="{{path}}" - data-folderName="{{page.folderName}}" - data-lang="{{page.lang}}" - data-fileName="{{page.fileName}}" - data-tool="{{page.tool}}" - data-permalink="{{page.permalink}}" - {%- - if - site.crossorigin - -%} - {{ - }} - crossorigin - {%- - endif - -%} - ></script> - {%- else -%} - <script - defer - src="{% ministamp { source_path: '{{ asset_dir }}', destination_path: '{{ asset_dir }}' } %}" - data-folderName="{{page.folderName}}" - data-lang="{{page.lang}}" - data-fileName="{{page.fileName}}" - data-tool="{{page.tool}}" - data-permalink="{{page.permalink}}" - {%- - if - site.crossorigin - -%} - {{ - }} - crossorigin - {%- - endif - -%} - ></script> - {%- endif -%} {%- else -%} - <script - defer - src="{{path}}" - data-folderName="{{page.folderName}}" - data-lang="{{page.lang}}" - data-fileName="{{page.fileName}}" - data-tool="{{page.tool}}" - data-permalink="{{page.permalink}}" - {%- - if - site.crossorigin - -%} - {{ - }} - crossorigin - {%- - endif - -%} - ></script> - {%- endif -%} {%- endfor -%} {%- endif -%} {%- if scriptData.jscdns -%} {%- for - item in scriptData.jscdns -%} {{item | replace:"$folderName", page.folderName | - replace: "$fileName", page.fileName | replace: "$lang", page.lang | replace: - "$tool", page.tool }} {%- endfor -%} {%- endif -%} {%- if page.layout == "frame" - -%} {%- assign font = "PT Sans" -%} {%- endif -%} {%- if page.layout == - "photo-effects-home" -%} {%- assign font = "PT Sans" -%} {%- endif -%} {%- if - page.layout == "calculator" -%} - <script defer src="/assets/js/calculator-tooltip.js"></script> - {%- endif -%} {%- if page.layout == 'home-1' or page.layout == "feature-1" -%} - {%- assign font = "Inter" -%} {%- endif -%} {%- if site.removeFontAwesome != - true -%} - <link - rel="stylesheet" - href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css" - integrity="sha512-iBBXm8fW90+nuLcSKlbmrPcLa0OT92xO1BIsZ+ywDWZCvqsWgccV3gFoRBv0z+8dLJgyAHIhR35VZc2oM/gI1w==" - crossorigin="anonymous" - referrerpolicy="no-referrer" - /> - {%- endif -%} {%- if page.layout == "feature" -%} - <script> - const toaster = document.querySelector(".toaster"); - if ( - !/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test( - navigator.userAgent - ) - ) { - if (navigator.userAgent.indexOf("Mac OS X") != -1) { - toaster.innerHTML = `Press Command + D to Bookmark this page`; - } else { - toaster.innerHTML = `Press Ctrl + D to Bookmark this page`; - } - } - setTimeout(() => { - toaster.style.display = "none"; - }, 20000); - </script> - {%- endif -%} - \ No newline at end of file +site.data.[page.folderName][lang][file] %} {%- assign dataAtt = +"data-folderName='$folderName' data-lang='$lang' data-fileName='$fileName' +data-tool='$tool'" -%} {%- assign $folderName = '$folderName' -%} {%- if +site.removeJquery != true -%} +<script + defer + src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js" + {%- + if + site.crossorigin + -%} + {{ + }} + crossorigin + {%- + endif + -%} +></script> +{%- endif -%} + +<script + defer + src="/assets/js/appscms-theme.js" + crossorigin="anonymous" +></script> +{%- if site.userTrackingCount -%} {%- include customScripts.html -%} {%- endif +-%} {%- if site.userTrackingCount and page.layout == "feature" -%} +<script defer src="/assets/js/usageTracking.js"></script> +<script defer src="/assets/js/usageTrackingEvents.js"></script> +<script defer src="/assets/js/sharePage.js"></script> +{%- endif -%} {%- if site.removeBootstrapJs != true -%} +<script + defer="defer" + src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/js/bootstrap.bundle.min.js" + integrity="sha384-Piv4xVNRyMGpqkS2by6br4gNJ7DXjqk09RmUpJ8jgGtD7zP9yug3goQfGII0yAns" + crossorigin="anonymous" +></script> +{%- endif -%} {{site.data.customcdns.customcdns.jsfiles}} {%- if +scriptData.jsfilepaths -%} {%- for path in scriptData.jsfilepaths -%} {%- assign +asset_dir = path -%} {%- if site.versioning and asset_dir != "" -%} {%- if +asset_dir contains "https" and asset_dir contains "https://" -%} +<script + defer + src="{{path}}" + data-folderName="{{page.folderName}}" + data-lang="{{page.lang}}" + data-fileName="{{page.fileName}}" + data-tool="{{page.tool}}" + data-permalink="{{page.permalink}}" + {%- + if + site.crossorigin + -%} + {{ + }} + crossorigin + {%- + endif + -%} +></script> +{%- else -%} +<script + defer + src="{% ministamp { source_path: '{{ asset_dir }}', destination_path: '{{ asset_dir }}' } %}" + data-folderName="{{page.folderName}}" + data-lang="{{page.lang}}" + data-fileName="{{page.fileName}}" + data-tool="{{page.tool}}" + data-permalink="{{page.permalink}}" + {%- + if + site.crossorigin + -%} + {{ + }} + crossorigin + {%- + endif + -%} +></script> +{%- endif -%} {%- else -%} +<script + defer + src="{{path}}" + data-folderName="{{page.folderName}}" + data-lang="{{page.lang}}" + data-fileName="{{page.fileName}}" + data-tool="{{page.tool}}" + data-permalink="{{page.permalink}}" + {%- + if + site.crossorigin + -%} + {{ + }} + crossorigin + {%- + endif + -%} +></script> +{%- endif -%} {%- endfor -%} {%- endif -%} {%- if scriptData.jscdns -%} {%- for +item in scriptData.jscdns -%} {{item | replace:"$folderName", page.folderName | +replace: "$fileName", page.fileName | replace: "$lang", page.lang | replace: +"$tool", page.tool }} {%- endfor -%} {%- endif -%} {%- if page.layout == "frame" +-%} {%- assign font = "PT Sans" -%} {%- endif -%} {%- if page.layout == +"photo-effects-home" -%} {%- assign font = "PT Sans" -%} {%- endif -%} {%- if +page.layout == "calculator" -%} +<script defer src="/assets/js/calculator-tooltip.js"></script> +{%- endif -%} {%- if page.layout == 'home-1' or page.layout == "feature-1" -%} +{%- assign font = "Inter" -%} {%- endif -%} {%- if site.removeFontAwesome != +true -%} +<link + rel="stylesheet" + href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css" + integrity="sha512-iBBXm8fW90+nuLcSKlbmrPcLa0OT92xO1BIsZ+ywDWZCvqsWgccV3gFoRBv0z+8dLJgyAHIhR35VZc2oM/gI1w==" + crossorigin="anonymous" + referrerpolicy="no-referrer" +/> +{%- endif -%} {%- if page.layout == "feature" -%} +<script> + const toaster = document.querySelector(".toaster"); + if ( + !/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test( + navigator.userAgent + ) + ) { + if (navigator.userAgent.indexOf("Mac OS X") != -1) { + toaster.innerHTML = `Press Command + D to Bookmark this page`; + } else { + toaster.innerHTML = `Press Ctrl + D to Bookmark this page`; + } + } + setTimeout(() => { + toaster.style.display = "none"; + }, 20000); +</script> +{%- endif -%}