diff --git a/themes/chameleon/layout/_partial/head.ejs b/themes/chameleon/layout/_partial/head.ejs index 0ce5a86..d1b9aca 100644 --- a/themes/chameleon/layout/_partial/head.ejs +++ b/themes/chameleon/layout/_partial/head.ejs @@ -46,9 +46,6 @@ - <%/* Fallback function for SRI */%> - <%- js({ src: '/js/sri.min.js', 'async': true }) %> - <%/* CSS of Chameleon theme */%> <%- css('/css/chameleon.css') %> diff --git a/themes/chameleon/source/libs/sri.min.js b/themes/chameleon/source/libs/sri.min.js deleted file mode 100644 index 646e469..0000000 --- a/themes/chameleon/source/libs/sri.min.js +++ /dev/null @@ -1,6 +0,0 @@ -/* - * subresource-integrity-fallback - * https://github.com/JackuB/subresource-integrity-fallback - * Licensed MIT © Jakub Mikulas - */ -try{!function(){const t=window.resourceLoadError||(()=>{}),e="data-sri-fallback",r=window.MutationObserver||window.WebKitMutationObserver;r&&new r(function(t){t.forEach(function(t){t.addedNodes.forEach(i)})}).observe(document,{childList:!0,subtree:!0});const i=function(r){const i=(r.tagName||"").toLowerCase();"link"!==i&&"script"!==i||!r.integrity||r.getAttribute("data-sri-fallback-retry")||(r.onerror=function(o){if(r.getAttribute(e)){const o=document.createElement(i),n=r.parentNode;o.setAttribute("data-sri-fallback-retry","1"),o.setAttribute("integrity",r.integrity),r.src&&o.setAttribute("src",r.getAttribute(e)),r.href&&o.setAttribute("href",r.getAttribute(e)),o.onerror=function(e){t(e,!0)},n.appendChild(o),r.remove()}else t(o,!1)})}}()}catch(t){console.error(t)} \ No newline at end of file