Skip to content

Commit

Permalink
build dist && bump version 7.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
_eternal_flame authored and _eternal_flame committed Aug 5, 2018
1 parent 98825ed commit 2c77dd5
Show file tree
Hide file tree
Showing 10 changed files with 799 additions and 258 deletions.
2 changes: 1 addition & 1 deletion build/pxer-utility.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const Babel = require('babel-core');

module.exports.pxerURL ='https://pxer-app.pea3nut.org/';
module.exports.rootPath ='../';
module.exports.pxerVersion ='7.0.11';
module.exports.pxerVersion ='7.1.0';

module.exports.path2URL =function(path){
var url =module.exports.pxerURL;
Expand Down
2 changes: 1 addition & 1 deletion dist/launcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
~function () {
var libURL = /**/"dist/lib.js"; //*/'';
var supportURL = /**/"dist/support.js"; //*/'';
window['PXER_VERSION'] = /**/"7.0.11"; //*/'';
window['PXER_VERSION'] = /**/"7.1.0"; //*/'';

Promise.resolve().then(function () {
var script = document.createElement('script');
Expand Down
26 changes: 26 additions & 0 deletions dist/lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,9 @@ window.execPromise = function (taskList, call) {
* - member_works 自己/其他人作品列表页
* - search 检索页
* - index 首页
* - discovery 探索
* - rank 排行榜
* - bookmark_new 关注的新作品
* - unknown 未知
* @param {string} url
* @return {string} - 页面类型
Expand All @@ -218,8 +221,12 @@ window.getPageType = function () {
} else {
type = 'bookmark_works';
}
} else if (URLData.path === '/bookmark_new_illust.php') {
type = 'bookmark_new';
} else if (URLData.path === '/member.php') {
type = 'member_info';
} else if (URLData.path === '/ranking.php') {
type = 'rank';
} else if (URLData.path === '/member_illust.php') {
if (URLData.query && URLData.query.mode) {
switch (URLData.query.mode) {
Expand All @@ -240,13 +247,32 @@ window.getPageType = function () {
}
} else if (URLData.path === '/search.php') {
type = 'search';
} else if (URLData.path === '/discovery') {
type = 'discovery';
} else if (URLData.path === '/') {
type = 'index';
} else {
type = 'unknown';
}
return type;
};
/**
* 查询对应页面类型每页作品数量
* @param {string} type - 作品类型
* @return {number} - 每页作品数
*/
window.getOnePageWorkCount = function (type) {
switch (type) {
case "search":
return 40;
case "rank":
return 50;
case "discovery":
return 3000;
default:
return 20;
};
};
/*EventTarget扩展
EventTarget.prototype['addOneEventListener'] =function(type,listener,useCapture){
var fn;
Expand Down
Loading

0 comments on commit 2c77dd5

Please sign in to comment.