From 1dbca52cabac98ea39f7fea59af2f5af73f3b7fa Mon Sep 17 00:00:00 2001 From: James Elliott Date: Wed, 22 Jun 2022 07:57:51 +1000 Subject: [PATCH] docs: fix clipboard (#3568) --- docs/assets/js/clipboard.js | 17 ++++++++--------- docs/layouts/index.headers | 2 +- docs/netlify.toml | 2 +- docs/package.json | 5 ++++- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/docs/assets/js/clipboard.js b/docs/assets/js/clipboard.js index 55eec7b36..0a9435d5a 100644 --- a/docs/assets/js/clipboard.js +++ b/docs/assets/js/clipboard.js @@ -21,17 +21,16 @@ var clipboard = new Clipboard('.btn-copy', { }); clipboard.on('success', function(e) { + /* + console.info('Action:', e.action); + console.info('Text:', e.text); + console.info('Trigger:', e.trigger); + */ - /* - console.info('Action:', e.action); - console.info('Text:', e.text); - console.info('Trigger:', e.trigger); - */ - - e.clearSelection(); + e.clearSelection(); }); clipboard.on('error', function(e) { - console.error('Action:', e.action); - console.error('Trigger:', e.trigger); + console.error('Action:', e.action); + console.error('Trigger:', e.trigger); }); diff --git a/docs/layouts/index.headers b/docs/layouts/index.headers index 5232a8356..73ed4b786 100644 --- a/docs/layouts/index.headers +++ b/docs/layouts/index.headers @@ -2,7 +2,7 @@ Strict-Transport-Security: max-age=31536000; includeSubDomains; preload X-Content-Type-Options: nosniff X-XSS-Protection: 1; mode=block - Content-Security-Policy: default-src 'self'; script-src 'self' 'unsafe-inline' 'sha512-RGGByJUOP98hE4wFZM78RM/3MijWJs0Tm0DbfrFhCDCXKXfDx60fii+syp5iMs3UcNX/1H4zJNgmqSejfhHrYw==' 'sha512-+T2H7TEv2U6umnIOWYijvTIrzdCZUYhm/FZo4YYQzKAHf8NWs+38cn3t9fdz2rCm2HqHDkthZZXnY4EWPdWnMA==' 'sha512-okYuGnNmmUuCX64AD7FVra0445z43U8riOY3jZue+WZ2KeVOWLo17hE/wZXGUIJh9WBiSHZ2epTd36MMP6R66w==' 'sha512-bv9WRsSROhTW5djDurORNUCGITVeRfjDXkhqg4Ez/4vTY6FcaVBPy4MXpn4EGC3J3oZNcxpfQIScElDKlmiLhw==' 'sha512-RBYr6Ld4w1yVqaACrgrBLQfPgGhj/1jyacA74WxJ1KM6KVcSWymwrdDwb3HDcdpwiNJ5yssot1He0U9vXoQVlg==' 'sha256-aWZ3y/RxbBYKHXH0z8+8ljrHG1mSBvyzSfxSMjBSaXk=' 'sha256-vOgyKS2vkH4n5TxBJpeh9SgzrE6LVGsAeOAvEST6oCc='; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self' data:; object-src 'none'; frame-src 'none'; frame-ancestors 'none'; base-uri 'none'; require-trusted-types-for 'script' + Content-Security-Policy: default-src 'self'; script-src 'self' https://*.netlify.app 'unsafe-inline' 'sha512-RGGByJUOP98hE4wFZM78RM/3MijWJs0Tm0DbfrFhCDCXKXfDx60fii+syp5iMs3UcNX/1H4zJNgmqSejfhHrYw==' 'sha512-+T2H7TEv2U6umnIOWYijvTIrzdCZUYhm/FZo4YYQzKAHf8NWs+38cn3t9fdz2rCm2HqHDkthZZXnY4EWPdWnMA==' 'sha512-okYuGnNmmUuCX64AD7FVra0445z43U8riOY3jZue+WZ2KeVOWLo17hE/wZXGUIJh9WBiSHZ2epTd36MMP6R66w==' 'sha512-bv9WRsSROhTW5djDurORNUCGITVeRfjDXkhqg4Ez/4vTY6FcaVBPy4MXpn4EGC3J3oZNcxpfQIScElDKlmiLhw==' 'sha512-RBYr6Ld4w1yVqaACrgrBLQfPgGhj/1jyacA74WxJ1KM6KVcSWymwrdDwb3HDcdpwiNJ5yssot1He0U9vXoQVlg==' 'sha256-aWZ3y/RxbBYKHXH0z8+8ljrHG1mSBvyzSfxSMjBSaXk=' 'sha256-vOgyKS2vkH4n5TxBJpeh9SgzrE6LVGsAeOAvEST6oCc='; style-src 'self' https://*.netlify.app 'unsafe-inline'; img-src 'self' https://*.netlify.app data:; connect-src 'self' https://*.netlify.app; font-src 'self' https://*.netlify.app; manifest-src 'self' https://*.netlify.app; object-src 'none'; frame-src https://app.netlify.com 'none''; frame-ancestors 'none'; base-uri 'none'; require-trusted-types-for 'script' X-Frame-Options: SAMEORIGIN Referrer-Policy: strict-origin Feature-Policy: geolocation 'self' diff --git a/docs/netlify.toml b/docs/netlify.toml index 092a0f1e1..454015645 100644 --- a/docs/netlify.toml +++ b/docs/netlify.toml @@ -3,7 +3,7 @@ functions = "functions" [build.environment] - NODE_VERSION = "17.8.0" + NODE_VERSION = "16.15.0" NPM_VERSION = "8.5.5" [context.production] diff --git a/docs/package.json b/docs/package.json index 2974b4c21..b3d85faae 100644 --- a/docs/package.json +++ b/docs/package.json @@ -2,6 +2,9 @@ "name": "@hyas/doks", "description": "Doks theme", "version": "0.4.2", + "engines": { + "node": ">=16.15.0" + }, "browserslist": [ "defaults" ], @@ -63,6 +66,6 @@ "stylelint-config-standard-scss": "4.0.0" }, "otherDependencies": { - "hugo": "0.96.0" + "hugo": "0.101.0" } }