1
0
Fork 0
mirror of https://github.com/Luzifer/past3.git synced 2024-11-09 16:30:01 +00:00

Replace CDNJS with jsDelivr

in order to prevent https://github.com/cdnjs/cdnjs/issues/13165 breaking stuff

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2019-02-01 11:27:30 +01:00
parent beeb879938
commit ec12953728
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E
2 changed files with 25 additions and 24 deletions

3
app.js
View file

@ -1,4 +1,5 @@
const allUsersURI = 'http://acs.amazonaws.com/groups/global/AllUsers' const allUsersURI = 'http://acs.amazonaws.com/groups/global/AllUsers'
const codemirrorModeURL = 'https://cdn.jsdelivr.net/npm/codemirror@5.43.0/mode/%N/%N.js'
const dateFormat = 'YYYY-MM-DD HH:mm:ss' const dateFormat = 'YYYY-MM-DD HH:mm:ss'
const defaultCacheControl = 'no-cache' const defaultCacheControl = 'no-cache'
@ -177,7 +178,7 @@ function init() {
// Configure AWS and CodeMirror // Configure AWS and CodeMirror
AWS.config.region = window.past3_config.region AWS.config.region = window.past3_config.region
CodeMirror.modeURL = 'https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.22.2/mode/%N/%N.js' CodeMirror.modeURL = codemirrorModeURL
// Initialize the editor // Initialize the editor
window.editor = CodeMirror.fromTextArea(document.getElementById('editor'), { window.editor = CodeMirror.fromTextArea(document.getElementById('editor'), {

View file

@ -7,14 +7,14 @@
<title>PaS(t)3 - S3 file editor</title> <title>PaS(t)3 - S3 file editor</title>
{% if config.bootswatch_theme %} {% if config.bootswatch_theme %}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/4.1.3/{{ config.bootswatch_theme }}/bootstrap.min.css" /> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootswatch@4.2.1/dist/{{ config.bootswatch_theme }}/bootstrap.min.css" />
{% else %} {% else %}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.3/css/bootstrap.min.css" <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.2.1/dist/css/bootstrap.min.css"
integrity="sha256-eSi1q2PG6J7g7ib17yAaWMcrr5GrtohYChqibrV7PBE=" crossorigin="anonymous" /> integrity="sha256-azvvU9xKluwHFJ0Cpgtf0CYzK7zgtOznnzxV4924X1w=" crossorigin="anonymous">
{% endif %} {% endif %}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.40.2/codemirror.min.css" <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/codemirror@5.43.0/lib/codemirror.css"
integrity="sha256-I8NyGs4wjbMuBSUE40o55W6k6P7tu/7G28/JGUUYCIs=" crossorigin="anonymous" /> integrity="sha256-o/v/5fOniPHMAww4EAIfRBFV0SeoqksPrY0Yq5x+wSM=" crossorigin="anonymous">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css"
integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous"> integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">
@ -149,27 +149,27 @@
<a href="https://github.com/Luzifer/past3" class="github-corner" aria-label="View source on Github"><svg width="80" height="80" viewBox="0 0 250 250" style="fill:#70B7FD; color:#fff; position: absolute; top: 0; border: 0; right: 0;" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg></a><style>.github-corner:hover .octo-arm{animation:octocat-wave 560ms ease-in-out}@keyframes octocat-wave{0%,100%{transform:rotate(0)}20%,60%{transform:rotate(-25deg)}40%,80%{transform:rotate(10deg)}}@media (max-width:500px){.github-corner:hover .octo-arm{animation:none}.github-corner .octo-arm{animation:octocat-wave 560ms ease-in-out}}</style> <a href="https://github.com/Luzifer/past3" class="github-corner" aria-label="View source on Github"><svg width="80" height="80" viewBox="0 0 250 250" style="fill:#70B7FD; color:#fff; position: absolute; top: 0; border: 0; right: 0;" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg></a><style>.github-corner:hover .octo-arm{animation:octocat-wave 560ms ease-in-out}@keyframes octocat-wave{0%,100%{transform:rotate(0)}20%,60%{transform:rotate(-25deg)}40%,80%{transform:rotate(10deg)}}@media (max-width:500px){.github-corner:hover .octo-arm{animation:none}.github-corner .octo-arm{animation:octocat-wave 560ms ease-in-out}}</style>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" <script src="https://cdn.jsdelivr.net/npm/jquery@3.3.1/dist/jquery.min.js"
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script> integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.22.2/moment.min.js" <script src="https://cdn.jsdelivr.net/npm/moment@2.24.0/moment.js"
integrity="sha256-CutOzxCRucUsn6C6TcEYsauvvYilEniTXldPa6/wu0k=" crossorigin="anonymous"></script> integrity="sha256-H9jAz//QLkDOy/nzE9G4aYijQtkLt9FvGmdUTwBk6gs=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.3/js/bootstrap.min.js" <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.2.1/dist/js/bootstrap.min.js"
integrity="sha256-VsEqElsCHSGmnmHXGQzvoWjWwoznFSZc6hs7ARLRacQ=" crossorigin="anonymous"></script> integrity="sha256-63ld7aiYP6UxBifJWEzz87ldJyVnETUABZAYs5Qcsmc=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/aws-sdk/2.320.0/aws-sdk.min.js" <script src="https://cdn.jsdelivr.net/npm/aws-sdk@2.395.0/lib/aws.js"
integrity="sha256-Yz6bx7+bZiZo2xpUubQIftoUNZA4GX7ryPJtmBH1CHk=" crossorigin="anonymous"></script> integrity="sha256-y+dWpa/KHATQxZCCYwXAgyGF1Db4+EM4JGuIRJtuJbI=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.40.2/codemirror.min.js" <script src="https://cdn.jsdelivr.net/npm/codemirror@5.43.0/lib/codemirror.js"
integrity="sha256-hY4lHTn7c3QSwGpgxj3OAYynw9Etpx530BNJHTmhvYA=" crossorigin="anonymous"></script> integrity="sha256-hfrh94yIofvTL6wibCN7M4INZZ1CjyxQnHt+cXXm2Tw=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.40.2/addon/mode/loadmode.min.js" <script src="https://cdn.jsdelivr.net/npm/codemirror@5.43.0/addon/mode/loadmode.js"
integrity="sha256-lV0GDqbsqZWyDhAX82N2eYbx+qydYmXOitWgRqQI9Ao=" crossorigin="anonymous"></script> integrity="sha256-FUiE+wlCEXQFUy8sn3HhxGwIy1HbblIMpCDt1o/4kJw=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.40.2/mode/meta.min.js" <script src="https://cdn.jsdelivr.net/npm/codemirror@5.43.0/mode/meta.js"
integrity="sha256-+YoTLm1iuD8g9GwmNrGt+xLBvrfbd2B+6C38qtkNE28=" crossorigin="anonymous"></script> integrity="sha256-RM2UdNwztCIJ51VS9I53w7iw8HlgmkhvjvUp1fowK4M=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.1/clipboard.min.js" <script src="https://cdn.jsdelivr.net/npm/clipboard@2.0.4/dist/clipboard.min.js"
integrity="sha256-hIvIxeqhGZF+VVeM55k0mJvWpQ6gTkWk3Emc+NmowYA=" crossorigin="anonymous"></script> integrity="sha256-FiZwavyI2V6+EXO1U+xzLG3IKldpiTFf3153ea9zikQ=" crossorigin="anonymous"></script>
<script src="app.js"></script> <script src="app.js"></script>
<script src="https://apis.google.com/js/platform.js?onload=renderButton" async defer></script> <script src="https://apis.google.com/js/platform.js?onload=renderButton" async defer></script>