From 438668a3dfe18e9585ead3bba0e31b4c0f451085 Mon Sep 17 00:00:00 2001
From: FreshP0325 <54257356+FreshP0325@users.noreply.github.com>
Date: Wed, 31 Jan 2024 14:35:43 +0800
Subject: [PATCH] Update Plugin.php
External assets optimization for Chinese webmasters.
---
Plugin.php | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/Plugin.php b/Plugin.php
index 6abcd83..eb45adf 100644
--- a/Plugin.php
+++ b/Plugin.php
@@ -22,18 +22,16 @@ class Plugin implements PluginInterface
const RADIO_VALUE_AUTO = 1;
const RADIO_VALUE_FORCE = 2;
- const CDN_SOURCE_DEFAULT = 'jsDelivr';
+ const CDN_SOURCE_DEFAULT = 'baomitu';
const CDN_SOURCE_MERMAID = [
'jsDelivr' => 'https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.esm.min.mjs',
'cdnjs' => 'https://cdnjs.cloudflare.com/ajax/libs/mermaid/10.7.0/mermaid.esm.min.mjs',
- 'baomitu' => 'https://lib.baomitu.com/mermaid/10.7.0/mermaid.esm.min.mjs',
- 'bootcdn' => 'https://cdn.bootcdn.net/ajax/libs/mermaid/10.7.0/mermaid.esm.min.mjs'
+ 'baomitu' => 'https://lib.baomitu.com/mermaid/10.7.0/mermaid.esm.min.mjs'
];
const CDN_SOURCE_MATHJAX = [
'jsDelivr' => 'https://cdn.jsdelivr.net/npm/mathjax/es5/tex-mml-chtml.min.js',
'cdnjs' => 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.2.2/es5/tex-mml-chtml.min.js',
- 'baomitu' => 'https://lib.baomitu.com/mathjax/latest/es5/tex-mml-chtml.min.js',
- 'bootcdn' => 'https://cdn.bootcdn.net/ajax/libs/mathjax/3.2.2/es5/tex-mml-chtml.min.js'
+ 'baomitu' => 'https://lib.baomitu.com/mathjax/latest/es5/tex-mml-chtml.min.js'
];
public static function activate()
@@ -105,7 +103,7 @@ public static function resourceLink()
if ($isAvailableMathjax) {
$resourceContent .= '';
- $resourceContent .= '';
+ $resourceContent .= '';
$resourceContent .= sprintf('', self::CDN_SOURCE_MATHJAX[$configCDN] ?: self::CDN_SOURCE_MATHJAX[self::CDN_SOURCE_DEFAULT]);
}