mirror of https://gitlab.com/curben/blog
Update fancybox and implement sri-fallback
https://github.com/cyph/sri-fallback
This commit is contained in:
parent
45b47a9414
commit
8e5c6f4f0f
|
@ -1,12 +1,13 @@
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha384-tsQFqpEReu7ZLhBV2VZlAu7zcOV+rXbYlF2cqB8txI/8aZajjp4Bqd+V6D5IgvKT" crossorigin="anonymous"></script>
|
<%- js('js/sri-fallback.min') %>
|
||||||
<script>(window.jQuery) || document.write('<%= js('js/jquery.min') %>');</script>
|
|
||||||
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.1/clipboard.min.js" integrity="sha384-JbuAF+8+4FF8uR/7D07/5IWwIj2FoNw5jJQGg1s8GtGIfQXFxWPRdMNWYmU35KjP" crossorigin="anonymous"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" x-sri-fallback="js/jquery.min.js" integrity="sha384-tsQFqpEReu7ZLhBV2VZlAu7zcOV+rXbYlF2cqB8txI/8aZajjp4Bqd+V6D5IgvKT" crossorigin="anonymous"></script>
|
||||||
<script>if (typeof ClipboardJS === "undefined") document.write('<%= js('js/clipboard.min') %>');</script>
|
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.1/clipboard.min.js" x-sri-fallback="js/clipboard.min.js" integrity="sha384-JbuAF+8+4FF8uR/7D07/5IWwIj2FoNw5jJQGg1s8GtGIfQXFxWPRdMNWYmU35KjP" crossorigin="anonymous"></script>
|
||||||
|
|
||||||
<% if (theme.fancybox){ %>
|
<% if (theme.fancybox){ %>
|
||||||
<%- css('fancybox/jquery.fancybox.min') %>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.4.2/jquery.fancybox.min.js" x-sri-fallback="fancybox/jquery.fancybox.min.js" integrity="sha384-j11bx3Frya+us3LfRdSq1uXZ7hsQU0UV5P3PEyRajHEHp87c8VLeM4jC/NE6SDsE" crossorigin="anonymous"></script>
|
||||||
<%- js('fancybox/jquery.fancybox.min') %>
|
|
||||||
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.4.2/jquery.fancybox.min.css" x-sri-fallback="fancybox/jquery.fancybox.min.css" integrity="sha384-GZkso4ketQR1gAuHEB2yZXtW5SF8uLAsjUsKhaHm4y33ZyPDmwnfZ8rQ4Tvqh1Et" crossorigin="anonymous">
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|
||||||
<%- js('js/typing') %>
|
<%- js('js/typing') %>
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1 @@
|
||||||
|
!function(){var a="x-sri-fallback";function o(e){var r=e.getAttribute&&e.getAttribute(a),i=(e.tagName||"").toLowerCase(),n="script"===i&&e.src?"src":"link"===i&&"stylesheet"===e.rel&&e.href?"href":null;r&&n&&(e.onerror=function(){var t=document.createElement(i);t.crossOrigin=e.crossOrigin,t.integrity=e.integrity,t[n]=r,"link"===i&&(t.rel=e.rel),t.onerror=function(){console.log("SRI fallback "+r+" also failed to match integrity string "+t.integrity+".")},document.head.appendChild(t)})}new MutationObserver(function(t){for(var e=0;e<t.length;++e){for(var r=t[e],i=r.addedNodes,n=0;n<i.length;++n)o(i[n]);r.attributeName===a&&o(r.target)}}).observe(document,{childList:!0,attributes:!0,characterData:!1,subtree:!0,attributeOldValue:!1,attributeFilter:[a]})}();
|
Loading…
Reference in New Issue