Skip to content

Commit

Permalink
Merge pull request #29 from Tim-Paik/master
Browse files Browse the repository at this point in the history
Upgrade dependency
  • Loading branch information
ppoffice authored Oct 31, 2021
2 parents 6b1e392 + 09277d8 commit 3e1fe43
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 18 deletions.
4 changes: 2 additions & 2 deletions src/view/comment/disqusjs.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ DisqusJs.Cacheable = cacheComponent(DisqusJs, 'comment.disqusjs', (props) => {
permalink: page.permalink,
pageTitle: page.title,
siteTitle: config.title,
jsUrl: helper.cdn('disqusjs', '1.2.5', 'dist/disqus.js'),
cssUrl: helper.cdn('disqusjs', '1.2.5', 'dist/disqusjs.css'),
jsUrl: helper.cdn('disqusjs', '1.3.0', 'dist/disqus.js'),
cssUrl: helper.cdn('disqusjs', '1.3.0', 'dist/disqusjs.css'),
};
});

Expand Down
2 changes: 1 addition & 1 deletion src/view/comment/facebook.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class Facebook extends Component {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/${fbLanguage}/sdk.js#xfbml=1&version=v2.8";
js.src = "//connect.facebook.net/${fbLanguage}/sdk.js#xfbml=1&version=v12.0";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));`;
return (
Expand Down
4 changes: 2 additions & 2 deletions src/view/comment/valine.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class Valine extends Component {
return (
<>
<div id="valine-thread" class="content"></div>
<script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
<script src="//cdn.jsdelivr.net/npm/leancloud-storage@3/dist/av-min.js"></script>
<script src={jsUrl}></script>
<script dangerouslySetInnerHTML={{ __html: js }}></script>
</>
Expand Down Expand Up @@ -137,7 +137,7 @@ Valine.Cacheable = cacheComponent(Valine, 'comment.valine', (props) => {
emojiMaps: comment.emoji_maps,
enableQQ: comment.enable_qq,
requiredFields: comment.required_fields,
jsUrl: helper.cdn('valine', '1.4.14', 'dist/Valine.min.js'),
jsUrl: helper.cdn('valine', '1.4.16', 'dist/Valine.min.js'),
};
});

Expand Down
2 changes: 1 addition & 1 deletion src/view/comment/waline.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ Waline.Cacheable = cacheComponent(Waline, 'comment.waline', (props) => {
mathTagSupport: comment.math_tag_support,
copyright: comment.copyright,
locale: comment.locale,
jsUrl: helper.cdn('@waline/client', '1.3.1', 'dist/Waline.min.js'),
jsUrl: helper.cdn('@waline/client', '1.3.11', 'dist/Waline.min.js'),
};
});

Expand Down
8 changes: 4 additions & 4 deletions src/view/plugin/gallery.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,12 @@ Gallery.Cacheable = cacheComponent(Gallery, 'plugin.gallery', (props) => {
return {
head,
lightGallery: {
jsUrl: helper.cdn('lightgallery', '1.6.8', 'dist/js/lightgallery.min.js'),
cssUrl: helper.cdn('lightgallery', '1.6.8', 'dist/css/lightgallery.min.css'),
jsUrl: helper.cdn('lightgallery', '1.10.0', 'dist/js/lightgallery.min.js'),
cssUrl: helper.cdn('lightgallery', '1.10.0', 'dist/css/lightgallery.min.css'),
},
justifiedGallery: {
jsUrl: helper.cdn('justifiedGallery', '3.7.0', 'dist/js/jquery.justifiedGallery.min.js'),
cssUrl: helper.cdn('justifiedGallery', '3.7.0', 'dist/css/justifiedGallery.min.css'),
jsUrl: helper.cdn('justifiedGallery', '3.8.1', 'dist/js/jquery.justifiedGallery.min.js'),
cssUrl: helper.cdn('justifiedGallery', '3.8.1', 'dist/css/justifiedGallery.min.css'),
},
};
});
Expand Down
8 changes: 4 additions & 4 deletions src/view/plugin/katex.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ KaTeX.Cacheable = cacheComponent(KaTeX, 'plugin.katex', (props) => {
return null;
}
return {
jsUrl: helper.cdn('katex', '0.11.1', 'dist/katex.min.js'),
cssUrl: helper.cdn('katex', '0.11.1', 'dist/katex.min.css'),
autoRenderUrl: helper.cdn('katex', '0.11.1', 'dist/contrib/auto-render.min.js'),
mhchemUrl: helper.cdn('katex', '0.11.1', 'dist/contrib/mhchem.js'),
jsUrl: helper.cdn('katex', '0.13.22', 'dist/katex.min.js'),
cssUrl: helper.cdn('katex', '0.13.22', 'dist/katex.min.css'),
autoRenderUrl: helper.cdn('katex', '0.13.22', 'dist/contrib/auto-render.min.js'),
mhchemUrl: helper.cdn('katex', '0.13.22', 'dist/contrib/mhchem.min.js'),
};
});

Expand Down
2 changes: 1 addition & 1 deletion src/view/plugin/mathjax.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Mathjax.Cacheable = cacheComponent(Mathjax, 'plugin.mathjax', (props) => {
return null;
}
return {
jsUrl: helper.cdn('mathjax', '2.7.5', 'unpacked/MathJax.js?config=TeX-MML-AM_CHTML'),
jsUrl: helper.cdn('mathjax', '2.7.9', 'unpacked/MathJax.js?config=TeX-MML-AM_CHTML'),
};
});

Expand Down
12 changes: 9 additions & 3 deletions src/view/plugin/progressbar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,21 @@ const { cacheComponent } = require('../../util/cache');
/**
* A JSX component for showing progress bar at top of the page.
*
* @see https://github.hubspot.com/pace/docs/welcome/
* @see https://codebyzach.github.io/pace/docs/
* @example
* <ProgressBar jsUrl="/path/to/pace-js.js" />
*/
class ProgressBar extends Component {
render() {
const { jsUrl } = this.props;
const css = `.pace{-webkit-pointer-events:none;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.pace-inactive{display:none}.pace .pace-progress{background:#3273dc;position:fixed;z-index:2000;top:0;right:100%;width:100%;height:2px}`;

return <script src={jsUrl}></script>;
return (
<>
<style>{css}</style>
<script src={jsUrl}></script>
</>
);
}
}

Expand All @@ -38,7 +44,7 @@ ProgressBar.Cacheable = cacheComponent(ProgressBar, 'plugin.progressbar', (props
return null;
}
return {
jsUrl: helper.cdn('pace-js', '1.0.2', 'pace.min.js'),
jsUrl: helper.cdn('pace-js', '1.2.4', 'pace.min.js'),
};
});

Expand Down

0 comments on commit 3e1fe43

Please sign in to comment.