Skip to content

Commit

Permalink
v0.6.2
Browse files Browse the repository at this point in the history
* Fix: google search console authentication failed if ga code not in `<head>`
* Fix: `clipboard-polyfill/text` dependency resolved issue
  • Loading branch information
kaiiiz committed Apr 15, 2021
2 parents 38b368c + 3fea091 commit 55d6cd6
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 7 deletions.
4 changes: 2 additions & 2 deletions assets/js/code-copy-btn.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as clipboard from "clipboard-polyfill/text";
import {writeText} from "clipboard-polyfill";

function registerHoverEvent(wrapper, button) {
wrapper.addEventListener('mouseenter', function () {
Expand All @@ -22,7 +22,7 @@ function registerTouchedEvent(pre, button) {
function registerClipboard(button, code_block) {
button.addEventListener('click', async function () {
try {
await clipboard.writeText(code_block.innerText);
await writeText(code_block.innerText);
button.blur();
button.innerText = 'Copied!';
setTimeout(function () {
Expand Down
10 changes: 10 additions & 0 deletions exampleSite/content/en/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ toc: false

## Changelog

### v0.6.2 - 2021/04/15

* Fix: google search console authentication failed if ga code not in `<head>`
* Fix: `clipboard-polyfill/text` dependency resolved issue

### v0.6.1 - 2021/02/17

* Fix: codepen shortcode id
* Change baseurl to example.com in exampleSite

### v0.6.0 - 2021/02/16

* Support MathJax
Expand Down
10 changes: 10 additions & 0 deletions exampleSite/content/zh-tw/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ toc: false

## Changelog

### v0.6.2 - 2021/04/15

* Fix: google search console authentication failed if ga code not in `<head>`
* Fix: `clipboard-polyfill/text` dependency resolved issue

### v0.6.1 - 2021/02/17

* Fix: codepen shortcode id
* Change baseurl to example.com in exampleSite

### v0.6.0 - 2021/02/16

* Support MathJax
Expand Down
4 changes: 4 additions & 0 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@

{{- partial "resources/css.html" . -}}

{{ if (.Scratch.Get "params").gaCode }}
{{ template "_internal/google_analytics_async.html" . }}
{{ end }}

{{/* Dark theme: inline in `head` to avoid FOUC */}}
<script>
if (localStorage.theme === 'dark' || (!('theme' in localStorage) && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
Expand Down
5 changes: 0 additions & 5 deletions layouts/partials/resources/js.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,3 @@
<script src="{{ $code_copy_js.RelPermalink }}" integrity="{{- $code_copy_js.Data.Integrity -}}"></script>
{{ end }}
{{ end }}

{{/* Google Analytics */}}
{{ if (.Scratch.Get "params").gaCode }}
{{ template "_internal/google_analytics_async.html" . }}
{{ end }}

0 comments on commit 55d6cd6

Please sign in to comment.