hexo-theme-shokax 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
package/_config.yml CHANGED
@@ -28,6 +28,8 @@ experiments:
28
28
  debug: false # 使用debug模式启动
29
29
  disableThemeComment: false # 禁用主题评论系统(一般用于关闭评论或让插件接管评论系统)
30
30
 
31
+ playerAPI: "https://api.injahow.cn" # 结尾不带/,只填写域名
32
+
31
33
  icon:
32
34
  favicon: "/favicon.ico"
33
35
  apple_touch_icon: "/apple-touch-icon.png"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hexo-theme-shokax",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "a hexo theme based on shoka",
5
5
  "main": "index.js",
6
6
  "repository": "https://github.com/zkz098/hexo-theme-shokaX",
@@ -42,7 +42,8 @@ hexo.extend.generator.register('script', function (locals) {
42
42
  quicklink: {
43
43
  timeout: theme.quicklink.timeout,
44
44
  priority: theme.quicklink.priority
45
- }
45
+ },
46
+ playerAPI: theme.playerAPI
46
47
  }
47
48
 
48
49
  if (config?.algolia) {
@@ -1,7 +1,7 @@
1
1
  const getDocHeight = () => $dom('main > .inner').offsetHeight;
2
2
  const $dom = (selector, element = document) => {
3
- if (selector.indexOf('#') === 0) {
4
- return element.getElementById(selector.replace('#', ''));
3
+ if (selector[0] === '#') {
4
+ return element.getElementById(selector.substring(1));
5
5
  }
6
6
  return element.querySelector(selector);
7
7
  };
@@ -388,7 +388,7 @@ const mediaPlayer = function (t, config) {
388
388
  resolve(list);
389
389
  }
390
390
  else {
391
- fetch('https://api.i-meto.com/meting/api?server=' + meta[0] + '&type=' + meta[1] + '&id=' + meta[2] + '&r=' + Math.random())
391
+ fetch(`${CONFIG.playerAPI}/meting/api?server=` + meta[0] + '&type=' + meta[1] + '&id=' + meta[2] + '&r=' + Math.random())
392
392
  .then(function (response) {
393
393
  return response.json();
394
394
  }).then(function (json) {