fix(assets): update cell-tooltip v0.2.0 to fix the MIME type error for the .cjs extension (#718)

This commit is contained in:
Cell
2026-03-20 11:20:25 +08:00
committed by GitHub
parent 96b4b4512c
commit 9e384b666f
6 changed files with 8 additions and 10 deletions
+2 -2
View File
@@ -19,8 +19,8 @@ libFiles:
# autocomplete-js@0.38.1 https://github.com/algolia/autocomplete
# TODO update autocompleteJS: '@algolia/autocomplete-js@1.7.1/dist/umd/index.production.js'
autocompleteJS: autocomplete.js@0.38.1/dist/autocomplete.min.js
# cell-tooltip@0.1.2 https://github.com/Lruihao/cell-tooltip
cellTooltipJS: cell-tooltip@0.1.2/dist/cell-tooltip.umd.cjs
# cell-tooltip@0.2.0 https://github.com/Lruihao/cell-tooltip
cellTooltipJS: cell-tooltip@0.2.0/dist/cell-tooltip.umd.js
# cell-watermark@1.0.3 https://github.com/Lruihao/watermark
cellWatermarkJS: cell-watermark@1.0.3/src/watermark.min.js
# cookieconsent@3.1.1 https://github.com/osano/cookieconsent
+2 -2
View File
@@ -19,8 +19,8 @@ libFiles:
# autocomplete-js@0.38.1 https://github.com/algolia/autocomplete
# TODO update autocompleteJS: '@algolia/autocomplete-js@1.7.1/dist/umd/index.production.js'
autocompleteJS: autocomplete.js@0.38.1/dist/autocomplete.min.js
# cell-tooltip@0.1.2 https://github.com/Lruihao/cell-tooltip
cellTooltipJS: cell-tooltip@0.1.2/dist/cell-tooltip.umd.cjs
# cell-tooltip@0.2.0 https://github.com/Lruihao/cell-tooltip
cellTooltipJS: cell-tooltip@0.2.0/dist/cell-tooltip.umd.js
# cell-watermark@1.0.3 https://github.com/Lruihao/watermark
cellWatermarkJS: cell-watermark@1.0.3/src/watermark.min.js
# cookieconsent@3.1.1 https://github.com/osano/cookieconsent
+2 -4
View File
@@ -1351,16 +1351,14 @@ class FixIt {
if ($ref.hasAttribute('title')) return;
$ref.setAttribute('title', $content.textContent.trim());
if (this.config.tooltip) {
const { Tooltip } = window.CellTooltip;
Tooltip.getOrCreateInstance($ref);
window.CellTooltip.getOrCreateInstance($ref);
}
});
}
initTooltip() {
if (!this.config.tooltip) return;
const { Tooltip } = window.CellTooltip;
Tooltip.initAll('[data-ct-tooltip]');
window.CellTooltip.initAll('[data-ct-tooltip]');
}
/**
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -216,7 +216,7 @@ FixIt theme assets partial
{{- /* Cell Tooltip */ -}}
{{- if eq .Site.Params.tooltip true -}}
{{- $source := $cdn.cellTooltipJS | default "lib/cell-tooltip/cell-tooltip.umd.cjs" -}}
{{- $source := $cdn.cellTooltipJS | default "lib/cell-tooltip/cell-tooltip.umd.js" -}}
{{- dict "Source" $source "Fingerprint" $fingerprint "Defer" true | dict "Page" . "Data" | partial "store/script.html" -}}
{{- $config = dict "tooltip" true | merge $config -}}
{{- end -}}