From ab2a401583e2be05fa175df1de1cbe15444fde72 Mon Sep 17 00:00:00 2001 From: Xcnte <38680808+Xcnte@users.noreply.github.com> Date: Sun, 28 Jun 2020 18:21:02 +0800 Subject: [PATCH] Update Plugin.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复跨域请求 --- Plugin.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Plugin.php b/Plugin.php index 8ec5f63..1750e62 100644 --- a/Plugin.php +++ b/Plugin.php @@ -4,7 +4,7 @@ * * @package CodePrettify * @author Xcnte - * @version 2.1.4 + * @version 2.1.5 * @link https://www.xcnte.com */ class CodePrettify_Plugin implements Typecho_Plugin_Interface { @@ -72,7 +72,7 @@ class CodePrettify_Plugin implements Typecho_Plugin_Interface { */ public static function header() { $style = Helper::options()->plugin('CodePrettify')->code_style; - $cssUrl = Helper::options()->pluginUrl . '/CodePrettify/static/styles/' . $style; + $cssUrl = Helper::options() -> rootUrl . '/usr/plugins/CodePrettify/static/styles/' . $style; echo ''; } @@ -81,8 +81,8 @@ class CodePrettify_Plugin implements Typecho_Plugin_Interface { *@return void */ public static function footer() { - $jsUrl = Helper::options()->pluginUrl . '/CodePrettify/static/prism.js'; - $jsUrl_clipboard = Helper::options()->pluginUrl . '/CodePrettify/static/clipboard.min.js'; + $jsUrl = Helper::options() -> rootUrl . '/usr/plugins/CodePrettify/static/prism.js'; + $jsUrl_clipboard = Helper::options() -> rootUrl . '/usr/plugins/CodePrettify/static/clipboard.min.js'; $showLineNumber = Helper::options()->plugin('CodePrettify')->showLineNumber; if ($showLineNumber) { echo <<