Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from hugo-fixit:master #25

Merged
merged 1 commit into from
Aug 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -199,8 +199,6 @@ Thanks to all the [contributors](https://github.com/hugo-fixit/FixIt/graphs/cont
- [github-corners](https://github.com/tholman/github-corners)
- [giscus](https://giscus.app/)
- [crypto-js](https://github.com/brix/crypto-js)
- [vConsole](https://github.com/Tencent/vConsole)
- [eruda](https://github.com/liriliri/eruda)
- [pace](https://github.com/CodeByZach/pace)

</details>
2 changes: 0 additions & 2 deletions README.zh-cn.md
Original file line number Diff line number Diff line change
@@ -203,8 +203,6 @@ FixIt 支持下列语言:
- [github-corners](https://github.com/tholman/github-corners)
- [giscus](https://giscus.app/zh-CN)
- [crypto-js](https://github.com/brix/crypto-js)
- [vConsole](https://github.com/Tencent/vConsole)
- [eruda](https://github.com/liriliri/eruda)
- [pace](https://github.com/CodeByZach/pace)

</details>
4 changes: 0 additions & 4 deletions assets/data/cdn/jsdelivr.yml
Original file line number Diff line number Diff line change
@@ -31,8 +31,6 @@ libFiles:
cryptoSha256JS: [email protected]/sha256.js
# [email protected] https://github.com/apache/echarts
echartsJS: [email protected]/dist/echarts.min.js
# [email protected] https://github.com/liriliri/eruda
erudaJS: [email protected]/eruda.js
# [email protected] https://github.com/FortAwesome/Font-Awesome
fontawesomeFreeCSS: '@fortawesome/[email protected]/css/all.min.css'
# [email protected] https://github.com/krisk/fuse
@@ -75,8 +73,6 @@ libFiles:
typeitJS: [email protected]/dist/index.umd.js
# [email protected] https://github.com/xCss/Valine
valineJS: [email protected]/dist/Valine.min.js
# [email protected] https://github.com/Tencent/vConsole
vconsoleJS: [email protected]/dist/vconsole.min.js
# [email protected] https://github.com/walinejs/waline
walineCSS: '@waline/[email protected]/dist/waline.css'
walineJS: '@waline/[email protected]/dist/waline.js'
4 changes: 0 additions & 4 deletions assets/data/cdn/unpkg.yml
Original file line number Diff line number Diff line change
@@ -31,8 +31,6 @@ libFiles:
cryptoSha256JS: [email protected]/sha256.js
# [email protected] https://github.com/apache/echarts
echartsJS: [email protected]/dist/echarts.min.js
# [email protected] https://github.com/liriliri/eruda
erudaJS: [email protected]/eruda.js
# [email protected] https://github.com/FortAwesome/Font-Awesome
fontawesomeFreeCSS: '@fortawesome/[email protected]/css/all.min.css'
# [email protected] https://github.com/krisk/fuse
@@ -75,8 +73,6 @@ libFiles:
typeitJS: [email protected]/dist/index.umd.js
# [email protected] https://github.com/xCss/Valine
valineJS: [email protected]/dist/Valine.min.js
# [email protected] https://github.com/Tencent/vConsole
vconsoleJS: [email protected]/dist/vconsole.min.js
# [email protected] https://github.com/walinejs/waline
walineCSS: '@waline/[email protected]/dist/waline.css'
walineJS: '@waline/[email protected]/dist/waline.js'
27 changes: 0 additions & 27 deletions assets/js/theme.js
Original file line number Diff line number Diff line change
@@ -1055,32 +1055,6 @@ class FixIt {
this.config.encryption?.all && this.decryptor.init();
}

initMDevtools() {
const type = this.config?.mDevtools;
if (typeof window.orientation === 'undefined') {
return;
}
if (type === 'vConsole') {
const vConsole = new VConsole({
target: '.widgets',
theme: this.isDark ? 'dark' : 'light'
});
this._vConsoleOnSwitchTheme = this._vConsoleOnSwitchTheme || (() => {
vConsole.setOption('theme', this.isDark ? 'dark' : 'light');
});
this.switchThemeEventSet.add(this._vConsoleOnSwitchTheme);
}
if(type === 'eruda') {
eruda.init({
defaults: { theme: this.isDark ? 'Dark' : 'Light' }
});
this._erudaOnSwitchTheme = this._erudaOnSwitchTheme || (() => {
eruda.util.evalCss.setTheme(this.isDark ? 'Dark' : 'Light');
});
this.switchThemeEventSet.add(this._erudaOnSwitchTheme);
}
}

initAutoMark() {
if (!this.config.autoBookmark) {
return;
@@ -1265,7 +1239,6 @@ class FixIt {
this.initSiteTime();
this.initServiceWorker();
this.initWatermark();
this.initMDevtools();
this.initAutoMark();
this.initReward();

2 changes: 0 additions & 2 deletions assets/lib/VERSION
Original file line number Diff line number Diff line change
@@ -9,7 +9,6 @@ [email protected] https://github.com/brix/crypto-js
[email protected] https://github.com/apache/echarts
TODO update emoji-data to 15.x
[email protected] https://github.com/iamcal/emoji-data
[email protected] https://github.com/liriliri/eruda
[email protected] https://github.com/FortAwesome/Font-Awesome
[email protected] https://github.com/krisk/fuse
[email protected] https://github.com/gitalk/gitalk
@@ -27,5 +26,4 @@ [email protected] https://github.com/twitter/twemoji
[email protected] https://github.com/imaegoo/twikoo
[email protected] https://github.com/alexmacarthur/typeit
[email protected] https://github.com/xCss/Valine
[email protected] https://github.com/Tencent/vConsole
[email protected] https://github.com/walinejs/waline
3 changes: 0 additions & 3 deletions assets/lib/eruda/eruda.js

This file was deleted.

10 changes: 0 additions & 10 deletions assets/lib/vconsole/vconsole.min.js

This file was deleted.

5 changes: 0 additions & 5 deletions hugo.toml
Original file line number Diff line number Diff line change
@@ -810,11 +810,6 @@ enableEmoji = true
enable = false
# Check for updates
c4u = false
# Mobile Devtools config
[params.dev.mDevtools]
enable = false
# "vConsole", "eruda" supported
type = "vConsole"

# Page config
[params.page]
11 changes: 0 additions & 11 deletions layouts/partials/assets.html
Original file line number Diff line number Diff line change
@@ -198,17 +198,6 @@
{{- $config = dict "all" (isset $params "password") "shortcode" ($encryptPartial | default false) | dict "encryption" | merge $config -}}
{{- end -}}

{{- /* Mobile Devtools */ -}}
{{- $mDevtools := (.Scratch.Get "devOpts").mDevtools -}}
{{- if $mDevtools.enable -}}
{{- $devtoolsJS := $cdn.vconsoleJS | default "lib/vconsole/vconsole.min.js" -}}
{{- if eq $mDevtools.type "eruda" -}}
{{- $devtoolsJS = $cdn.erudaJS | default "lib/eruda/eruda.js" -}}
{{- end -}}
{{- dict "Source" $devtoolsJS "Fingerprint" $fingerprint "Defer" true | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
{{- $config = dict "mDevtools" ($mDevtools.type | default "vConsole") | merge $config -}}
{{- end -}}

{{- /* 不蒜子 */ -}}
{{- if .Site.Params.busuanzi.enable | and hugo.IsProduction -}}
{{- $source := .Site.Params.busuanzi.source | default "https://vercount.one/js" -}}
2 changes: 1 addition & 1 deletion layouts/partials/init/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- .Scratch.Set "version" "v0.3.10-51d64cb1" -}}
{{- .Scratch.Set "version" "v0.3.10-24873c5e" -}}
{{- .Scratch.Set "this" dict -}}

{{- partial "init/detection-env.html" . -}}