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
Show file tree
Hide file tree
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
Expand Up @@ -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>
Expand Down
2 changes: 0 additions & 2 deletions README.zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
4 changes: 0 additions & 4 deletions assets/data/cdn/jsdelivr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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'
Expand Down
4 changes: 0 additions & 4 deletions assets/data/cdn/unpkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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'
Expand Down
27 changes: 0 additions & 27 deletions assets/js/theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -1265,7 +1239,6 @@ class FixIt {
this.initSiteTime();
this.initServiceWorker();
this.initWatermark();
this.initMDevtools();
this.initAutoMark();
this.initReward();

Expand Down
2 changes: 0 additions & 2 deletions assets/lib/VERSION
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Up @@ -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]
Expand Down
11 changes: 0 additions & 11 deletions layouts/partials/assets.html
Original file line number Diff line number Diff line change
Expand Up @@ -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" -}}
Expand Down
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" . -}}
Expand Down
Loading