Skip to content

Commit

Permalink
🔧 修复jsdelivr导致vditor无法使用的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
adlered committed May 24, 2022
1 parent ac29d24 commit 4d5ba90
Show file tree
Hide file tree
Showing 31 changed files with 2,667 additions and 3,591 deletions.
4 changes: 2 additions & 2 deletions gulpfile.js
Expand Up @@ -28,7 +28,7 @@
const gulp = require('gulp')
const concat = require('gulp-concat')
const terser = require('gulp-terser')
const sass = require('gulp-sass')
const sass = require('gulp-sass')(require('sass'));
const rename = require('gulp-rename')
const autoprefixer = require('gulp-autoprefixer')
const del = require('del')
Expand Down Expand Up @@ -167,4 +167,4 @@ function cleanProcess () {
gulp.task('default',
gulp.series(cleanProcess, sassSkinProcess, sassCommonProcess,
gulp.parallel(minSkinJS, minJS),
gulp.parallel(miniPjax, miniAdmin, miniAdminLibs)))
gulp.parallel(miniPjax, miniAdmin, miniAdminLibs)))
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -33,11 +33,11 @@
"gulp-autoprefixer": "^7.0.1",
"gulp-concat": "^2.6.1",
"gulp-rename": "^1.4.0",
"gulp-sass": "^4.0.2",
"gulp-sass": "^5.1.0",
"gulp-terser": "^1.2.0"
},
"dependencies": {
"sass": "^1.32.12",
"sass": "^1.51.0",
"vditor": "^3.8.5"
}
}
2 changes: 1 addition & 1 deletion src/main/webapp/admin/admin-index.ftl
Expand Up @@ -240,7 +240,7 @@
</div>
</div>
<script src="${staticServePath}/js/lib/compress/admin-lib.min.js"></script>
<script src="https://unpkg.com/vditor@3.8.5/dist/index.min.js"></script>
<script src="https://file.fishpi.cn/vditor/3.8.13/dist/index.min.js"></script>
<script src="${staticServePath}/js/common.js"></script>
<#if "" == miniPostfix>
<script src="${staticServePath}/js/admin/admin.js"></script>
Expand Down
4 changes: 2 additions & 2 deletions src/main/webapp/js/common.js
Expand Up @@ -167,7 +167,7 @@ var Util = {
parseMarkdown: function () {
if (typeof Vditor !== 'function') {
Util.addScript(
'https://cdn.jsdelivr.net/npm/vditor@3.8.5/dist/method.min.js',
'https://file.fishpi.cn/vditor/3.8.13/dist/method.min.js',
'vditorPreviewScript')
}

Expand Down Expand Up @@ -415,4 +415,4 @@ if (!Cookie) {
'; path=/'
},
}
}
}
2 changes: 1 addition & 1 deletion src/main/webapp/js/common.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/main/webapp/js/page.js
Expand Up @@ -140,7 +140,7 @@ $.extend(Page.prototype, {
if (!$('#soloEditorComment').hasClass('vditor')) {
var that = this;
Util.addScript(
'https://cdn.jsdelivr.net/npm/vditor@3.8.5/dist/index.min.js',
'https://file.fishpi.cn/vditor/3.8.13/dist/index.min.js',
'vditorScript');
var toolbar = [
'emoji',
Expand Down

0 comments on commit 4d5ba90

Please sign in to comment.