efront 4.21.0 → 4.21.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -27,6 +27,11 @@ var {
27
27
  PREVENT_FRAMEWORK_MODE = preventFrame,
28
28
  devicePixelRatio = 1,
29
29
  startPath: efrontPath,
30
+ loading_title = {
31
+ "en-us": "Loading..",
32
+ "en-hk": "Loading..",
33
+ "en-ca": "Loading..",
34
+ }[navigator.language && navigator.language.toLowerCase()] || '加载中..',
30
35
  pixelDecoder // = d => d / 16 + "rem"
31
36
  } = window;
32
37
  if (PREVENT_FRAMEWORK_MODE !== false) {
@@ -509,7 +514,8 @@ var createModule = function (exec, originNames, compiledNames, prebuilds = {}) {
509
514
  return exec.apply(_this, args);
510
515
  });
511
516
  };
512
-
517
+ var loading_count = 0;
518
+ var saved_title = document && document.title;
513
519
  var init = function (url, then, prebuilds, keeppage) {
514
520
  // then = bindthen(then);
515
521
  var key = keyprefix + url;
@@ -604,7 +610,13 @@ var init = function (url, then, prebuilds, keeppage) {
604
610
  var report = window.performance || !window.alert ? console.error : window.alert;
605
611
  report(`加载 ${url} 失败,${ed && ed.length ? `${ed.join(', ')} 等 ${ed.length} 个模块` : "没有其他模块"}受到影响。\r\n${track.join("\r\n")}`);
606
612
  };
613
+ var loadingid = ++loading_count;
614
+ if (document && loading_title !== document.title) {
615
+ saved_title = document.title;
616
+ document.title = loading_title;
617
+ }
607
618
  loadModule(url, function (error) {
619
+ if (loadingid === loading_count && document && document.title === loading_title) document.title = saved_title;
608
620
  if (hasOwnProperty.call(modules, url)) {
609
621
  then(modules[url]);
610
622
  return;
@@ -901,4 +913,4 @@ var onload = function () {
901
913
  hook(--requires_count);
902
914
  };
903
915
  if (!document || document.body) onload();
904
- else window.onload = onload;
916
+ else window.onload = onload;
@@ -0,0 +1,27 @@
1
+ function* combgen() {
2
+ var total = 1;
3
+ var argsList = Array.prototype.map.call(arguments, a => {
4
+ total *= a.length;
5
+ return a;
6
+ });
7
+ var temp = total;
8
+ var ratioList = argsList.map(a => temp = temp / a.length);
9
+ var i = 0;
10
+ for (var cx = 0, dx = total; cx < dx; cx++) {
11
+ var temp = cx;
12
+ var res = yield argsList.map(function (a, cx) {
13
+ var index = temp / ratioList[cx] | 0;
14
+ temp = temp - index * ratioList[cx];
15
+ return a[index];
16
+ });
17
+ if (res === false) {
18
+ i++;
19
+ if (i > argsList.length) break;
20
+ var tx = argsList[argsList.length - i].length;
21
+ cx += tx - cx % tx - 1;
22
+ }
23
+ else {
24
+ i = 0;
25
+ }
26
+ }
27
+ }
@@ -891,17 +891,14 @@ var data = {
891
891
  },
892
892
  fromApi(api, params, parse) {
893
893
  var p = privates.fromApi(api, params);
894
- if (isEmpty(params)) p.id = api.id;
895
894
  return this.createResponse(p, parse);
896
895
  },
897
896
  postURL(url, data, parse) {
898
897
  var p = privates.loadIgnoreConfig("post", url, data);
899
- p.id = url;
900
898
  return this.createResponse(p, parse);
901
899
  },
902
900
  fromURL(url, parse) {
903
901
  var p = privates.loadIgnoreConfig('get', url);
904
- p.id = url;
905
902
  return this.createResponse(p, parse);
906
903
  },
907
904
  createResponse(p, parse) {
@@ -1170,6 +1167,7 @@ var fireListener = function (instanceId, data) {
1170
1167
  };
1171
1168
  data.setItem = data.setInstance;
1172
1169
  data.getItem = data.getInstance;
1170
+ data.seekResponse = seekResponse;
1173
1171
  data.removeItem = data.removeInstance;
1174
1172
  extend(dataSourceMap, loadInstance(localStorage, sourceDataId));
1175
1173
  extend(dataSourceMap, loadInstance(sessionStorage, sourceDataId));
@@ -1 +1 @@
1
- Object.assign;
1
+ &extend;
@@ -4,7 +4,7 @@ class Generator {
4
4
  this.exec = f.bind(this, this.return.bind(this), this.throw.bind(this), function (value, next) {
5
5
  this.exec = next;
6
6
  this.value = value;
7
- });
7
+ }.bind(this));
8
8
  };
9
9
  throw(e) {
10
10
  delete this.exec;
@@ -16,7 +16,7 @@ function Main(dataid, datapath, titleid) {
16
16
  zimoli.go(datapath, s);
17
17
  }
18
18
  },
19
- png: img,
19
+ png: pic,
20
20
  config: {},
21
21
  player: kugou$player,
22
22
  datas: []
@@ -5,7 +5,7 @@ function main(elem) {
5
5
  elem = elem || document.createElement("song");
6
6
  var $scope = {
7
7
  filterTime,
8
- png: img,
8
+ png: pic,
9
9
  bg,
10
10
  play(s) {
11
11
  if (!s) s = this.song.items ? this.song.items[0] : this.song;
@@ -19,6 +19,9 @@ function decodeHttpResponse(response) {
19
19
  default:
20
20
  console.warn(i18n`内容格式不支持:`, response.headers["content-encoding"]);
21
21
  }
22
- if (decoder) response = response.pipe(decoder);
22
+ if (decoder) {
23
+ delete headers["content-encoding"];
24
+ response = response.pipe(decoder);
25
+ }
23
26
  return response;
24
27
  }
@@ -1,4 +1,5 @@
1
1
  return globalThis.localStorage || {
2
2
  getItem() { },
3
- setItem() { }
3
+ setItem() { },
4
+ removeItem() { },
4
5
  }
@@ -1 +1 @@
1
- return globalThis.sessionStorage || { getItem() { }, setItem() { } };
1
+ return globalThis.sessionStorage || { getItem() { }, setItem() { }, removeItem() { } };
@@ -4,7 +4,7 @@ var setsrc = function (src) {
4
4
  });
5
5
  };
6
6
 
7
- function img() {
7
+ function main() {
8
8
  var image = document.createElement("png");
9
9
  care(image, setsrc);
10
10
  return image;
@@ -34,7 +34,7 @@ extend(renderDefaults, {
34
34
  delete: drop,
35
35
  close: drop,
36
36
  remove: drop,
37
- pic: img,
37
+ pic,
38
38
  image,
39
39
  back,
40
40
  success,
@@ -1 +1,5 @@
1
+ // 之前一直以为赤匪习是中国走向衰败的罪魁祸首,可是随着了解的史料越来越多,越发觉得之前以为的是错的,赤匪习不过是泱泱赤匪的一个代表,赤匪从根上就是长了四只脚的土匪,他们任人唯亲,见利忘义,睚眦必报,是盘踞在华夏大地的邪恶力量的化身。他们不辨是非,做事一轰而上,唯上级马屁是瞻,遇到问题首先想到的是封锁消息,问题爆发又会选择性失聪,顾左右而言其他。
2
+ // 赤匪犯境时,河南大学为了保护师资,举校万里迁徙,赤匪看不见这其中的民族大义,篡权后将将北大清华那种墙头草视为香饽饽,倾斜各种资源重点培养,助长他们的墙头草作风。你看那清华北大,为国外培养了多少高科技人才啊,他们之前是墙头草,如今也还是墙头草。
3
+ // 儿时那清凉可口的井水,如今散发着浓郁的农药味。儿时那干净透亮的空气,晴天可以看到白云,阴天可以看到乌云,晚上还有月牙和群星同晖,如今已长年雾蒙蒙一片。可怜我华夏大地被赤匪汲取精华拱手送人,忍受各国糟粕还要强颜欢笑。
4
+
1
5
  return "\u0080";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efront",
3
- "version": "4.21.0",
3
+ "version": "4.21.2",
4
4
  "description": "一个开发环境,提供一种自由的前端开发模式,也可作为辅助工具使用。",
5
5
  "main": "public/efront.js",
6
6
  "directories": {