translate showHistoryPopup and extendedVillageProfile into Polish
This commit is contained in:
parent
5806adb2da
commit
631d16c026
|
@ -212,7 +212,7 @@ exports.default = void 0;
|
|||
var _default = v => v === undefined || v === null;
|
||||
|
||||
exports.default = _default;
|
||||
},{}],"dPMc":[function(require,module,exports) {
|
||||
},{}],"yrCm":[function(require,module,exports) {
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
|
@ -222,7 +222,7 @@ exports.default = void 0;
|
|||
|
||||
var _renderTodaysStats = _interopRequireDefault(require("../i18n/renderTodaysStats"));
|
||||
|
||||
var _isNil = _interopRequireDefault(require("./isNil"));
|
||||
var _isNil = _interopRequireDefault(require("../utils/isNil"));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
|
@ -250,7 +250,7 @@ var _default = (container, stats) => {
|
|||
};
|
||||
|
||||
exports.default = _default;
|
||||
},{"../i18n/renderTodaysStats":"l9PO","./isNil":"yQib"}],"chDM":[function(require,module,exports) {
|
||||
},{"../i18n/renderTodaysStats":"l9PO","../utils/isNil":"yQib"}],"chDM":[function(require,module,exports) {
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
|
@ -594,7 +594,7 @@ const loadInADayData = async function loadInADayData(type) {
|
|||
};
|
||||
|
||||
exports.loadInADayData = loadInADayData;
|
||||
},{"../libs/InADayParser":"dSAr"}],"VMe7":[function(require,module,exports) {
|
||||
},{"../libs/InADayParser":"dSAr"}],"vNT1":[function(require,module,exports) {
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
|
@ -604,13 +604,13 @@ exports.default = void 0;
|
|||
|
||||
var _showEnnoblementsPopup = _interopRequireDefault(require("../i18n/showEnnoblementsPopup"));
|
||||
|
||||
var _pagination = require("./pagination");
|
||||
var _pagination = require("../utils/pagination");
|
||||
|
||||
var _showPopup = _interopRequireDefault(require("./showPopup"));
|
||||
var _showPopup = _interopRequireDefault(require("../utils/showPopup"));
|
||||
|
||||
var _formatDate = _interopRequireDefault(require("./formatDate"));
|
||||
var _formatDate = _interopRequireDefault(require("../utils/formatDate"));
|
||||
|
||||
var _tribalwars = require("./tribalwars");
|
||||
var _tribalwars = require("../utils/tribalwars");
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
|
@ -661,7 +661,7 @@ var _default = function _default(e, ennoblements) {
|
|||
};
|
||||
|
||||
exports.default = _default;
|
||||
},{"../i18n/showEnnoblementsPopup":"tKRp","./pagination":"fCHX","./showPopup":"chDM","./formatDate":"V6Mf","./tribalwars":"fHHP"}],"VYL5":[function(require,module,exports) {
|
||||
},{"../i18n/showEnnoblementsPopup":"tKRp","../utils/pagination":"fCHX","../utils/showPopup":"chDM","../utils/formatDate":"V6Mf","../utils/tribalwars":"fHHP"}],"VYL5":[function(require,module,exports) {
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
|
@ -855,7 +855,45 @@ function subDays(dirtyDate, dirtyAmount) {
|
|||
var amount = (0, _index.default)(dirtyAmount);
|
||||
return (0, _index2.default)(dirtyDate, -amount);
|
||||
}
|
||||
},{"../_lib/toInteger/index.js":"VYL5","../addDays/index.js":"lQIY","../_lib/requiredArgs/index.js":"kK6Q"}],"jHKY":[function(require,module,exports) {
|
||||
},{"../_lib/toInteger/index.js":"VYL5","../addDays/index.js":"lQIY","../_lib/requiredArgs/index.js":"kK6Q"}],"hNDe":[function(require,module,exports) {
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
const translations = {
|
||||
pl_PL: {
|
||||
title: "Historia",
|
||||
date: 'Data',
|
||||
tribe: 'Plemię',
|
||||
points: 'Punkty',
|
||||
rank: 'Ranking',
|
||||
villages: 'Liczba wiosek',
|
||||
members: 'Liczba członków',
|
||||
oda: 'Pokonani przeciwnicy jako agresor',
|
||||
odd: 'Pokonani przeciwnicy jako obrońca',
|
||||
ods: 'Pokonani przeciwnicy jako wspierający',
|
||||
od: 'Pokonani przeciwnicy'
|
||||
},
|
||||
en_DK: {
|
||||
title: "History",
|
||||
date: 'Date',
|
||||
tribe: 'Tribe',
|
||||
points: 'Points',
|
||||
villages: 'Villages',
|
||||
members: 'Members',
|
||||
oda: 'ODA',
|
||||
odd: 'ODD',
|
||||
ods: 'ODS',
|
||||
od: 'OD'
|
||||
}
|
||||
};
|
||||
|
||||
var _default = () => translations[window.game_data.locale] || translations.en_DK;
|
||||
|
||||
exports.default = _default;
|
||||
},{}],"kEDU":[function(require,module,exports) {
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
|
@ -865,17 +903,20 @@ exports.default = void 0;
|
|||
|
||||
var _subDays = _interopRequireDefault(require("date-fns/subDays"));
|
||||
|
||||
var _showPopup = _interopRequireDefault(require("./showPopup"));
|
||||
var _showHistoryPopup = _interopRequireDefault(require("../i18n/showHistoryPopup"));
|
||||
|
||||
var _pagination = require("./pagination");
|
||||
var _showPopup = _interopRequireDefault(require("../utils/showPopup"));
|
||||
|
||||
var _formatDate = _interopRequireDefault(require("./formatDate"));
|
||||
var _pagination = require("../utils/pagination");
|
||||
|
||||
var _tribalwars = require("./tribalwars");
|
||||
var _formatDate = _interopRequireDefault(require("../utils/formatDate"));
|
||||
|
||||
var _tribalwars = require("../utils/tribalwars");
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
const PAGINATION_CONTAINER_ID = 'historyPagination';
|
||||
const translations = (0, _showHistoryPopup.default)();
|
||||
|
||||
const addMathSymbol = v => {
|
||||
return v > 0 ? '+' + v : v;
|
||||
|
@ -893,7 +934,7 @@ var _default = function _default(e, history, daily) {
|
|||
limit,
|
||||
currentPage
|
||||
});
|
||||
const html = "\n <div style=\"".concat((0, _pagination.getContainerStyles)(), "\" id=\"").concat(PAGINATION_CONTAINER_ID, "\">\n ").concat(paginationItems.join(''), "\n </div>\n <table class=\"vis\" style=\"border-collapse: separate; border-spacing: 2px; width: 100%;\">\n <tbody>\n <tr>\n <th>\n Date\n </th>\n ").concat(tribe ? '' : '<th>Tribe</th>', "\n <th>\n Points\n </th>\n <th>\n Villages\n </th>\n ").concat(tribe ? '<th>Members</th>' : '', "\n <th>\n OD\n </th>\n <th>\n ODA\n </th>\n <th>\n ODD\n </th>\n ").concat(tribe ? '' : '<th>ODS</th>', "\n </tr>\n ").concat(history.items.map(history => {
|
||||
const html = "\n <div style=\"".concat((0, _pagination.getContainerStyles)(), "\" id=\"").concat(PAGINATION_CONTAINER_ID, "\">\n ").concat(paginationItems.join(''), "\n </div>\n <table class=\"vis\" style=\"border-collapse: separate; border-spacing: 2px; width: 100%;\">\n <tbody>\n <tr>\n <th>\n ").concat(translations.date, "\n </th>\n ").concat(tribe ? '' : "<th>".concat(translations.tribe, "</th>"), "\n <th>\n ").concat(translations.points, "\n </th>\n <th>\n ").concat(translations.villages, "\n </th>\n ").concat(tribe ? "<th>".concat(translations.members, "</th>") : '', "\n <th>\n ").concat(translations.od, "\n </th>\n <th>\n ").concat(translations.oda, "\n </th>\n <th>\n ").concat(translations.odd, "\n </th>\n ").concat(tribe ? '' : "<th>".concat(translations.ods, "</th>"), "\n </tr>\n ").concat(history.items.map(history => {
|
||||
const subtracted = (0, _subDays.default)(new Date(history.createDate), 1).toISOString().split('.')[0] + 'Z';
|
||||
const stats = daily.items.find(stats => {
|
||||
return stats.createDate === subtracted;
|
||||
|
@ -915,7 +956,7 @@ var _default = function _default(e, history, daily) {
|
|||
}).join(''), "\n </tbody>\n </table>\n ");
|
||||
(0, _showPopup.default)({
|
||||
e,
|
||||
title: "History",
|
||||
title: translations.title,
|
||||
id: 'history',
|
||||
html
|
||||
});
|
||||
|
@ -925,7 +966,7 @@ var _default = function _default(e, history, daily) {
|
|||
};
|
||||
|
||||
exports.default = _default;
|
||||
},{"date-fns/subDays":"mRRL","./showPopup":"chDM","./pagination":"fCHX","./formatDate":"V6Mf","./tribalwars":"fHHP"}],"DMkL":[function(require,module,exports) {
|
||||
},{"date-fns/subDays":"mRRL","../i18n/showHistoryPopup":"hNDe","../utils/showPopup":"chDM","../utils/pagination":"fCHX","../utils/formatDate":"V6Mf","../utils/tribalwars":"fHHP"}],"DMkL":[function(require,module,exports) {
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
|
@ -982,13 +1023,13 @@ exports.setItem = setItem;
|
|||
|
||||
var _requestCreator = _interopRequireDefault(require("./libs/requestCreator"));
|
||||
|
||||
var _renderTodaysStats = _interopRequireDefault(require("./utils/renderTodaysStats"));
|
||||
var _renderTodaysStats = _interopRequireDefault(require("./common/renderTodaysStats"));
|
||||
|
||||
var _showPopup = _interopRequireDefault(require("./utils/showPopup"));
|
||||
|
||||
var _showEnnoblementsPopup = _interopRequireDefault(require("./utils/showEnnoblementsPopup"));
|
||||
var _showEnnoblementsPopup = _interopRequireDefault(require("./common/showEnnoblementsPopup"));
|
||||
|
||||
var _showHistoryPopup = _interopRequireDefault(require("./utils/showHistoryPopup"));
|
||||
var _showHistoryPopup = _interopRequireDefault(require("./common/showHistoryPopup"));
|
||||
|
||||
var _pagination = require("./utils/pagination");
|
||||
|
||||
|
@ -1017,7 +1058,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|||
// @namespace https://github.com/tribalwarshelp/scripts
|
||||
// @updateURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/extendedPlayerProfile.js
|
||||
// @downloadURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/extendedPlayerProfile.js
|
||||
// @version 1.0.8
|
||||
// @version 1.0.9
|
||||
// @description Extended Player Profile
|
||||
// @author Kichiyaki http://dawid-wysokinski.pl/
|
||||
// @match *://*/game.php*screen=info_player*
|
||||
|
@ -1393,4 +1434,4 @@ const renderActions = () => {
|
|||
console.log('extended player profile', error);
|
||||
}
|
||||
})();
|
||||
},{"./libs/requestCreator":"Ph2E","./utils/renderTodaysStats":"dPMc","./utils/showPopup":"chDM","./utils/showEnnoblementsPopup":"VMe7","./utils/showHistoryPopup":"jHKY","./utils/pagination":"fCHX","./utils/getIDFromURL":"tQUs","./utils/getCurrentServer":"DMkL","./utils/formatDate":"V6Mf","./utils/twstats":"Syko","./utils/tribalwars":"fHHP","./utils/localStorage":"KWxH"}]},{},["yRop"], null)
|
||||
},{"./libs/requestCreator":"Ph2E","./common/renderTodaysStats":"yrCm","./utils/showPopup":"chDM","./common/showEnnoblementsPopup":"vNT1","./common/showHistoryPopup":"kEDU","./utils/pagination":"fCHX","./utils/getIDFromURL":"tQUs","./utils/getCurrentServer":"DMkL","./utils/formatDate":"V6Mf","./utils/twstats":"Syko","./utils/tribalwars":"fHHP","./utils/localStorage":"KWxH"}]},{},["yRop"], null)
|
|
@ -1066,7 +1066,7 @@ exports.default = void 0;
|
|||
var _default = v => v === undefined || v === null;
|
||||
|
||||
exports.default = _default;
|
||||
},{}],"dPMc":[function(require,module,exports) {
|
||||
},{}],"yrCm":[function(require,module,exports) {
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
|
@ -1076,7 +1076,7 @@ exports.default = void 0;
|
|||
|
||||
var _renderTodaysStats = _interopRequireDefault(require("../i18n/renderTodaysStats"));
|
||||
|
||||
var _isNil = _interopRequireDefault(require("./isNil"));
|
||||
var _isNil = _interopRequireDefault(require("../utils/isNil"));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
|
@ -1104,7 +1104,7 @@ var _default = (container, stats) => {
|
|||
};
|
||||
|
||||
exports.default = _default;
|
||||
},{"../i18n/renderTodaysStats":"l9PO","./isNil":"yQib"}],"tKRp":[function(require,module,exports) {
|
||||
},{"../i18n/renderTodaysStats":"l9PO","../utils/isNil":"yQib"}],"tKRp":[function(require,module,exports) {
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
|
@ -1369,7 +1369,7 @@ const loadInADayData = async function loadInADayData(type) {
|
|||
};
|
||||
|
||||
exports.loadInADayData = loadInADayData;
|
||||
},{"../libs/InADayParser":"dSAr"}],"VMe7":[function(require,module,exports) {
|
||||
},{"../libs/InADayParser":"dSAr"}],"vNT1":[function(require,module,exports) {
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
|
@ -1379,13 +1379,13 @@ exports.default = void 0;
|
|||
|
||||
var _showEnnoblementsPopup = _interopRequireDefault(require("../i18n/showEnnoblementsPopup"));
|
||||
|
||||
var _pagination = require("./pagination");
|
||||
var _pagination = require("../utils/pagination");
|
||||
|
||||
var _showPopup = _interopRequireDefault(require("./showPopup"));
|
||||
var _showPopup = _interopRequireDefault(require("../utils/showPopup"));
|
||||
|
||||
var _formatDate = _interopRequireDefault(require("./formatDate"));
|
||||
var _formatDate = _interopRequireDefault(require("../utils/formatDate"));
|
||||
|
||||
var _tribalwars = require("./tribalwars");
|
||||
var _tribalwars = require("../utils/tribalwars");
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
|
@ -1436,7 +1436,7 @@ var _default = function _default(e, ennoblements) {
|
|||
};
|
||||
|
||||
exports.default = _default;
|
||||
},{"../i18n/showEnnoblementsPopup":"tKRp","./pagination":"fCHX","./showPopup":"chDM","./formatDate":"V6Mf","./tribalwars":"fHHP"}],"VYL5":[function(require,module,exports) {
|
||||
},{"../i18n/showEnnoblementsPopup":"tKRp","../utils/pagination":"fCHX","../utils/showPopup":"chDM","../utils/formatDate":"V6Mf","../utils/tribalwars":"fHHP"}],"VYL5":[function(require,module,exports) {
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
|
@ -1555,7 +1555,45 @@ function subDays(dirtyDate, dirtyAmount) {
|
|||
var amount = (0, _index.default)(dirtyAmount);
|
||||
return (0, _index2.default)(dirtyDate, -amount);
|
||||
}
|
||||
},{"../_lib/toInteger/index.js":"VYL5","../addDays/index.js":"lQIY","../_lib/requiredArgs/index.js":"kK6Q"}],"jHKY":[function(require,module,exports) {
|
||||
},{"../_lib/toInteger/index.js":"VYL5","../addDays/index.js":"lQIY","../_lib/requiredArgs/index.js":"kK6Q"}],"hNDe":[function(require,module,exports) {
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
const translations = {
|
||||
pl_PL: {
|
||||
title: "Historia",
|
||||
date: 'Data',
|
||||
tribe: 'Plemię',
|
||||
points: 'Punkty',
|
||||
rank: 'Ranking',
|
||||
villages: 'Liczba wiosek',
|
||||
members: 'Liczba członków',
|
||||
oda: 'Pokonani przeciwnicy jako agresor',
|
||||
odd: 'Pokonani przeciwnicy jako obrońca',
|
||||
ods: 'Pokonani przeciwnicy jako wspierający',
|
||||
od: 'Pokonani przeciwnicy'
|
||||
},
|
||||
en_DK: {
|
||||
title: "History",
|
||||
date: 'Date',
|
||||
tribe: 'Tribe',
|
||||
points: 'Points',
|
||||
villages: 'Villages',
|
||||
members: 'Members',
|
||||
oda: 'ODA',
|
||||
odd: 'ODD',
|
||||
ods: 'ODS',
|
||||
od: 'OD'
|
||||
}
|
||||
};
|
||||
|
||||
var _default = () => translations[window.game_data.locale] || translations.en_DK;
|
||||
|
||||
exports.default = _default;
|
||||
},{}],"kEDU":[function(require,module,exports) {
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
|
@ -1565,17 +1603,20 @@ exports.default = void 0;
|
|||
|
||||
var _subDays = _interopRequireDefault(require("date-fns/subDays"));
|
||||
|
||||
var _showPopup = _interopRequireDefault(require("./showPopup"));
|
||||
var _showHistoryPopup = _interopRequireDefault(require("../i18n/showHistoryPopup"));
|
||||
|
||||
var _pagination = require("./pagination");
|
||||
var _showPopup = _interopRequireDefault(require("../utils/showPopup"));
|
||||
|
||||
var _formatDate = _interopRequireDefault(require("./formatDate"));
|
||||
var _pagination = require("../utils/pagination");
|
||||
|
||||
var _tribalwars = require("./tribalwars");
|
||||
var _formatDate = _interopRequireDefault(require("../utils/formatDate"));
|
||||
|
||||
var _tribalwars = require("../utils/tribalwars");
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
const PAGINATION_CONTAINER_ID = 'historyPagination';
|
||||
const translations = (0, _showHistoryPopup.default)();
|
||||
|
||||
const addMathSymbol = v => {
|
||||
return v > 0 ? '+' + v : v;
|
||||
|
@ -1593,7 +1634,7 @@ var _default = function _default(e, history, daily) {
|
|||
limit,
|
||||
currentPage
|
||||
});
|
||||
const html = "\n <div style=\"".concat((0, _pagination.getContainerStyles)(), "\" id=\"").concat(PAGINATION_CONTAINER_ID, "\">\n ").concat(paginationItems.join(''), "\n </div>\n <table class=\"vis\" style=\"border-collapse: separate; border-spacing: 2px; width: 100%;\">\n <tbody>\n <tr>\n <th>\n Date\n </th>\n ").concat(tribe ? '' : '<th>Tribe</th>', "\n <th>\n Points\n </th>\n <th>\n Villages\n </th>\n ").concat(tribe ? '<th>Members</th>' : '', "\n <th>\n OD\n </th>\n <th>\n ODA\n </th>\n <th>\n ODD\n </th>\n ").concat(tribe ? '' : '<th>ODS</th>', "\n </tr>\n ").concat(history.items.map(history => {
|
||||
const html = "\n <div style=\"".concat((0, _pagination.getContainerStyles)(), "\" id=\"").concat(PAGINATION_CONTAINER_ID, "\">\n ").concat(paginationItems.join(''), "\n </div>\n <table class=\"vis\" style=\"border-collapse: separate; border-spacing: 2px; width: 100%;\">\n <tbody>\n <tr>\n <th>\n ").concat(translations.date, "\n </th>\n ").concat(tribe ? '' : "<th>".concat(translations.tribe, "</th>"), "\n <th>\n ").concat(translations.points, "\n </th>\n <th>\n ").concat(translations.villages, "\n </th>\n ").concat(tribe ? "<th>".concat(translations.members, "</th>") : '', "\n <th>\n ").concat(translations.od, "\n </th>\n <th>\n ").concat(translations.oda, "\n </th>\n <th>\n ").concat(translations.odd, "\n </th>\n ").concat(tribe ? '' : "<th>".concat(translations.ods, "</th>"), "\n </tr>\n ").concat(history.items.map(history => {
|
||||
const subtracted = (0, _subDays.default)(new Date(history.createDate), 1).toISOString().split('.')[0] + 'Z';
|
||||
const stats = daily.items.find(stats => {
|
||||
return stats.createDate === subtracted;
|
||||
|
@ -1615,7 +1656,7 @@ var _default = function _default(e, history, daily) {
|
|||
}).join(''), "\n </tbody>\n </table>\n ");
|
||||
(0, _showPopup.default)({
|
||||
e,
|
||||
title: "History",
|
||||
title: translations.title,
|
||||
id: 'history',
|
||||
html
|
||||
});
|
||||
|
@ -1625,7 +1666,7 @@ var _default = function _default(e, history, daily) {
|
|||
};
|
||||
|
||||
exports.default = _default;
|
||||
},{"date-fns/subDays":"mRRL","./showPopup":"chDM","./pagination":"fCHX","./formatDate":"V6Mf","./tribalwars":"fHHP"}],"DMkL":[function(require,module,exports) {
|
||||
},{"date-fns/subDays":"mRRL","../i18n/showHistoryPopup":"hNDe","../utils/showPopup":"chDM","../utils/pagination":"fCHX","../utils/formatDate":"V6Mf","../utils/tribalwars":"fHHP"}],"DMkL":[function(require,module,exports) {
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
|
@ -1688,11 +1729,11 @@ var _requestCreator = _interopRequireDefault(require("./libs/requestCreator"));
|
|||
|
||||
var _pagination = require("./utils/pagination");
|
||||
|
||||
var _renderTodaysStats = _interopRequireDefault(require("./utils/renderTodaysStats"));
|
||||
var _renderTodaysStats = _interopRequireDefault(require("./common/renderTodaysStats"));
|
||||
|
||||
var _showEnnoblementsPopup = _interopRequireDefault(require("./utils/showEnnoblementsPopup"));
|
||||
var _showEnnoblementsPopup = _interopRequireDefault(require("./common/showEnnoblementsPopup"));
|
||||
|
||||
var _showHistoryPopup = _interopRequireDefault(require("./utils/showHistoryPopup"));
|
||||
var _showHistoryPopup = _interopRequireDefault(require("./common/showHistoryPopup"));
|
||||
|
||||
var _showPopup = _interopRequireDefault(require("./utils/showPopup"));
|
||||
|
||||
|
@ -1721,7 +1762,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|||
// @namespace https://github.com/tribalwarshelp/scripts
|
||||
// @updateURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/extendedTribeProfile.js
|
||||
// @downloadURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/extendedTribeProfile.js
|
||||
// @version 0.9.5
|
||||
// @version 0.9.6
|
||||
// @description Extended Tribe Profile
|
||||
// @author Kichiyaki http://dawid-wysokinski.pl/
|
||||
// @match *://*/game.php*screen=info_ally*
|
||||
|
@ -2189,4 +2230,4 @@ const renderActions = () => {
|
|||
console.log('extended tribe profile', error);
|
||||
}
|
||||
})();
|
||||
},{"validator/lib/isURL":"XMVV","date-fns/differenceInDays":"mdVI","./libs/requestCreator":"Ph2E","./utils/pagination":"fCHX","./utils/renderTodaysStats":"dPMc","./utils/showEnnoblementsPopup":"VMe7","./utils/showHistoryPopup":"jHKY","./utils/showPopup":"chDM","./utils/getIDFromURL":"tQUs","./utils/getCurrentServer":"DMkL","./utils/localStorage":"KWxH","./utils/formatDate":"V6Mf","./utils/twstats":"Syko","./utils/tribalwars":"fHHP"}]},{},["r4nF"], null)
|
||||
},{"validator/lib/isURL":"XMVV","date-fns/differenceInDays":"mdVI","./libs/requestCreator":"Ph2E","./utils/pagination":"fCHX","./common/renderTodaysStats":"yrCm","./common/showEnnoblementsPopup":"vNT1","./common/showHistoryPopup":"kEDU","./utils/showPopup":"chDM","./utils/getIDFromURL":"tQUs","./utils/getCurrentServer":"DMkL","./utils/localStorage":"KWxH","./utils/formatDate":"V6Mf","./utils/twstats":"Syko","./utils/tribalwars":"fHHP"}]},{},["r4nF"], null)
|
|
@ -157,6 +157,29 @@ var _default = function _default() {
|
|||
});
|
||||
};
|
||||
|
||||
exports.default = _default;
|
||||
},{}],"LNef":[function(require,module,exports) {
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
const translations = {
|
||||
pl_PL: {
|
||||
action: {
|
||||
showEnnoblements: 'Pokaż przejęcia'
|
||||
}
|
||||
},
|
||||
en_DK: {
|
||||
action: {
|
||||
showEnnoblements: 'Show ennoblements'
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var _default = () => translations[window.game_data.locale] || translations.en_DK;
|
||||
|
||||
exports.default = _default;
|
||||
},{}],"fCHX":[function(require,module,exports) {
|
||||
"use strict";
|
||||
|
@ -513,7 +536,7 @@ const loadInADayData = async function loadInADayData(type) {
|
|||
};
|
||||
|
||||
exports.loadInADayData = loadInADayData;
|
||||
},{"../libs/InADayParser":"dSAr"}],"VMe7":[function(require,module,exports) {
|
||||
},{"../libs/InADayParser":"dSAr"}],"vNT1":[function(require,module,exports) {
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
|
@ -523,13 +546,13 @@ exports.default = void 0;
|
|||
|
||||
var _showEnnoblementsPopup = _interopRequireDefault(require("../i18n/showEnnoblementsPopup"));
|
||||
|
||||
var _pagination = require("./pagination");
|
||||
var _pagination = require("../utils/pagination");
|
||||
|
||||
var _showPopup = _interopRequireDefault(require("./showPopup"));
|
||||
var _showPopup = _interopRequireDefault(require("../utils/showPopup"));
|
||||
|
||||
var _formatDate = _interopRequireDefault(require("./formatDate"));
|
||||
var _formatDate = _interopRequireDefault(require("../utils/formatDate"));
|
||||
|
||||
var _tribalwars = require("./tribalwars");
|
||||
var _tribalwars = require("../utils/tribalwars");
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
|
@ -580,18 +603,20 @@ var _default = function _default(e, ennoblements) {
|
|||
};
|
||||
|
||||
exports.default = _default;
|
||||
},{"../i18n/showEnnoblementsPopup":"tKRp","./pagination":"fCHX","./showPopup":"chDM","./formatDate":"V6Mf","./tribalwars":"fHHP"}],"UdfQ":[function(require,module,exports) {
|
||||
},{"../i18n/showEnnoblementsPopup":"tKRp","../utils/pagination":"fCHX","../utils/showPopup":"chDM","../utils/formatDate":"V6Mf","../utils/tribalwars":"fHHP"}],"UdfQ":[function(require,module,exports) {
|
||||
"use strict";
|
||||
|
||||
var _requestCreator = _interopRequireDefault(require("./libs/requestCreator"));
|
||||
|
||||
var _extendedVillageProfile = _interopRequireDefault(require("./i18n/extendedVillageProfile"));
|
||||
|
||||
var _pagination = require("./utils/pagination");
|
||||
|
||||
var _getCurrentServer = _interopRequireDefault(require("./utils/getCurrentServer"));
|
||||
|
||||
var _getIDFromURL = _interopRequireDefault(require("./utils/getIDFromURL"));
|
||||
|
||||
var _showEnnoblementsPopup = _interopRequireDefault(require("./utils/showEnnoblementsPopup"));
|
||||
var _showEnnoblementsPopup = _interopRequireDefault(require("./common/showEnnoblementsPopup"));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
|
@ -600,7 +625,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|||
// @namespace https://github.com/tribalwarshelp/scripts
|
||||
// @updateURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/extendedVillageProfile.js
|
||||
// @downloadURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/extendedVillageProfile.js
|
||||
// @version 0.5.5
|
||||
// @version 0.5.6
|
||||
// @description Extended Village Profile
|
||||
// @author Kichiyaki http://dawid-wysokinski.pl/
|
||||
// @match *://*/game.php*screen=info_village*
|
||||
|
@ -612,6 +637,7 @@ const VILLAGE_ID = (0, _getIDFromURL.default)(window.location.search);
|
|||
const ENNOBLEMENTS_QUERY = "\n query ennoblements($server: String!, $filter: EnnoblementFilter!) {\n ennoblements(server: $server, filter: $filter) {\n total\n items {\n village {\n id\n name\n x\n y\n }\n oldOwner {\n id\n name\n }\n oldOwnerTribe {\n id\n tag\n }\n newOwner {\n id\n name\n }\n newOwnerTribe {\n id\n tag\n }\n ennobledAt\n }\n }\n }\n";
|
||||
const ENNOBLEMENTS_PER_PAGE = 15;
|
||||
const actionsContainer = document.querySelector('#content_value > table > tbody > tr > td:nth-child(1) > table:nth-child(2) > tbody');
|
||||
const translations = (0, _extendedVillageProfile.default)();
|
||||
|
||||
const handleShowTribeEnnoblementsClick = async e => {
|
||||
e.preventDefault();
|
||||
|
@ -651,7 +677,7 @@ const renderActions = () => {
|
|||
const showEnnoblementsPopup = document.createElement('a');
|
||||
showEnnoblementsPopup.href = '#';
|
||||
(0, _pagination.setPage)(showEnnoblementsPopup, '1');
|
||||
showEnnoblementsPopup.innerHTML = 'Show ennoblements';
|
||||
showEnnoblementsPopup.innerHTML = translations.action.showEnnoblements;
|
||||
showEnnoblementsPopup.addEventListener('click', handleShowTribeEnnoblementsClick);
|
||||
actionsContainer.appendChild(wrapAction(showEnnoblementsPopup));
|
||||
};
|
||||
|
@ -659,4 +685,4 @@ const renderActions = () => {
|
|||
(function () {
|
||||
renderActions();
|
||||
})();
|
||||
},{"./libs/requestCreator":"Ph2E","./utils/pagination":"fCHX","./utils/getCurrentServer":"DMkL","./utils/getIDFromURL":"tQUs","./utils/showEnnoblementsPopup":"VMe7"}]},{},["UdfQ"], null)
|
||||
},{"./libs/requestCreator":"Ph2E","./i18n/extendedVillageProfile":"LNef","./utils/pagination":"fCHX","./utils/getCurrentServer":"DMkL","./utils/getIDFromURL":"tQUs","./common/showEnnoblementsPopup":"vNT1"}]},{},["UdfQ"], null)
|
|
@ -1,5 +1,5 @@
|
|||
import getTranslations from '../i18n/renderTodaysStats';
|
||||
import isNil from './isNil';
|
||||
import isNil from '../utils/isNil';
|
||||
|
||||
const translations = getTranslations();
|
||||
|
|
@ -1,13 +1,16 @@
|
|||
import getTranslations from '../i18n/showEnnoblementsPopup';
|
||||
import { generatePaginationItems, getContainerStyles } from './pagination';
|
||||
import showPopup from './showPopup';
|
||||
import formatDate from './formatDate';
|
||||
import {
|
||||
generatePaginationItems,
|
||||
getContainerStyles,
|
||||
} from '../utils/pagination';
|
||||
import showPopup from '../utils/showPopup';
|
||||
import formatDate from '../utils/formatDate';
|
||||
import {
|
||||
formatTribeURL,
|
||||
formatPlayerURL as formatPlayerURLTribalWars,
|
||||
formatVillageName,
|
||||
formatVillageURL,
|
||||
} from './tribalwars';
|
||||
} from '../utils/tribalwars';
|
||||
|
||||
const PAGINATION_CONTAINER_ID = 'ennoblementsPagination';
|
||||
const translations = getTranslations();
|
|
@ -1,10 +1,15 @@
|
|||
import subDays from 'date-fns/subDays';
|
||||
import showPopup from './showPopup';
|
||||
import { generatePaginationItems, getContainerStyles } from './pagination';
|
||||
import formatDate from './formatDate';
|
||||
import { formatTribeURL } from './tribalwars';
|
||||
import getTranslations from '../i18n/showHistoryPopup';
|
||||
import showPopup from '../utils/showPopup';
|
||||
import {
|
||||
generatePaginationItems,
|
||||
getContainerStyles,
|
||||
} from '../utils/pagination';
|
||||
import formatDate from '../utils/formatDate';
|
||||
import { formatTribeURL } from '../utils/tribalwars';
|
||||
|
||||
const PAGINATION_CONTAINER_ID = 'historyPagination';
|
||||
const translations = getTranslations();
|
||||
|
||||
const addMathSymbol = (v) => {
|
||||
return v > 0 ? '+' + v : v;
|
||||
|
@ -29,26 +34,26 @@ export default (
|
|||
<tbody>
|
||||
<tr>
|
||||
<th>
|
||||
Date
|
||||
${translations.date}
|
||||
</th>
|
||||
${tribe ? '' : '<th>Tribe</th>'}
|
||||
${tribe ? '' : `<th>${translations.tribe}</th>`}
|
||||
<th>
|
||||
Points
|
||||
${translations.points}
|
||||
</th>
|
||||
<th>
|
||||
Villages
|
||||
${translations.villages}
|
||||
</th>
|
||||
${tribe ? '<th>Members</th>' : ''}
|
||||
${tribe ? `<th>${translations.members}</th>` : ''}
|
||||
<th>
|
||||
OD
|
||||
${translations.od}
|
||||
</th>
|
||||
<th>
|
||||
ODA
|
||||
${translations.oda}
|
||||
</th>
|
||||
<th>
|
||||
ODD
|
||||
${translations.odd}
|
||||
</th>
|
||||
${tribe ? '' : '<th>ODS</th>'}
|
||||
${tribe ? '' : `<th>${translations.ods}</th>`}
|
||||
</tr>
|
||||
${history.items
|
||||
.map((history) => {
|
||||
|
@ -130,7 +135,7 @@ export default (
|
|||
|
||||
showPopup({
|
||||
e,
|
||||
title: `History`,
|
||||
title: translations.title,
|
||||
id: 'history',
|
||||
html,
|
||||
});
|
|
@ -1,8 +1,8 @@
|
|||
import requestCreator from './libs/requestCreator';
|
||||
import renderTodaysStats from './utils/renderTodaysStats';
|
||||
import renderTodaysStats from './common/renderTodaysStats';
|
||||
import showPopup from './utils/showPopup';
|
||||
import showEnnoblementsPopup from './utils/showEnnoblementsPopup';
|
||||
import showHistoryPopup from './utils/showHistoryPopup';
|
||||
import showEnnoblementsPopup from './common/showEnnoblementsPopup';
|
||||
import showHistoryPopup from './common/showHistoryPopup';
|
||||
import {
|
||||
generatePaginationItems,
|
||||
getContainerStyles,
|
||||
|
@ -21,7 +21,7 @@ import { setItem, getItem } from './utils/localStorage';
|
|||
// @namespace https://github.com/tribalwarshelp/scripts
|
||||
// @updateURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/extendedPlayerProfile.js
|
||||
// @downloadURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/extendedPlayerProfile.js
|
||||
// @version 1.0.8
|
||||
// @version 1.0.9
|
||||
// @description Extended Player Profile
|
||||
// @author Kichiyaki http://dawid-wysokinski.pl/
|
||||
// @match *://*/game.php*screen=info_player*
|
||||
|
|
|
@ -7,9 +7,9 @@ import {
|
|||
generatePaginationItems,
|
||||
getContainerStyles,
|
||||
} from './utils/pagination';
|
||||
import renderTodaysStats from './utils/renderTodaysStats';
|
||||
import showEnnoblementsPopup from './utils/showEnnoblementsPopup';
|
||||
import showHistoryPopup from './utils/showHistoryPopup';
|
||||
import renderTodaysStats from './common/renderTodaysStats';
|
||||
import showEnnoblementsPopup from './common/showEnnoblementsPopup';
|
||||
import showHistoryPopup from './common/showHistoryPopup';
|
||||
import showPopup from './utils/showPopup';
|
||||
import getIDFromURL from './utils/getIDFromURL';
|
||||
import getCurrentServer from './utils/getCurrentServer';
|
||||
|
@ -23,7 +23,7 @@ import { formatPlayerURL as formatPlayerURLTribalWars } from './utils/tribalwars
|
|||
// @namespace https://github.com/tribalwarshelp/scripts
|
||||
// @updateURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/extendedTribeProfile.js
|
||||
// @downloadURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/extendedTribeProfile.js
|
||||
// @version 0.9.5
|
||||
// @version 0.9.6
|
||||
// @description Extended Tribe Profile
|
||||
// @author Kichiyaki http://dawid-wysokinski.pl/
|
||||
// @match *://*/game.php*screen=info_ally*
|
||||
|
|
|
@ -1,15 +1,16 @@
|
|||
import requestCreator from './libs/requestCreator';
|
||||
import getTranslations from './i18n/extendedVillageProfile';
|
||||
import { setPage, getPage } from './utils/pagination';
|
||||
import getCurrentServer from './utils/getCurrentServer';
|
||||
import getIDFromURL from './utils/getIDFromURL';
|
||||
import showEnnoblementsPopup from './utils/showEnnoblementsPopup';
|
||||
import showEnnoblementsPopup from './common/showEnnoblementsPopup';
|
||||
|
||||
// ==UserScript==
|
||||
// @name Extended Village Profile
|
||||
// @namespace https://github.com/tribalwarshelp/scripts
|
||||
// @updateURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/extendedVillageProfile.js
|
||||
// @downloadURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/extendedVillageProfile.js
|
||||
// @version 0.5.5
|
||||
// @version 0.5.6
|
||||
// @description Extended Village Profile
|
||||
// @author Kichiyaki http://dawid-wysokinski.pl/
|
||||
// @match *://*/game.php*screen=info_village*
|
||||
|
@ -55,6 +56,7 @@ const ENNOBLEMENTS_PER_PAGE = 15;
|
|||
const actionsContainer = document.querySelector(
|
||||
'#content_value > table > tbody > tr > td:nth-child(1) > table:nth-child(2) > tbody'
|
||||
);
|
||||
const translations = getTranslations();
|
||||
|
||||
const handleShowTribeEnnoblementsClick = async (e) => {
|
||||
e.preventDefault();
|
||||
|
@ -93,7 +95,7 @@ const renderActions = () => {
|
|||
const showEnnoblementsPopup = document.createElement('a');
|
||||
showEnnoblementsPopup.href = '#';
|
||||
setPage(showEnnoblementsPopup, '1');
|
||||
showEnnoblementsPopup.innerHTML = 'Show ennoblements';
|
||||
showEnnoblementsPopup.innerHTML = translations.action.showEnnoblements;
|
||||
showEnnoblementsPopup.addEventListener(
|
||||
'click',
|
||||
handleShowTribeEnnoblementsClick
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
const translations = {
|
||||
pl_PL: {
|
||||
action: {
|
||||
showEnnoblements: 'Pokaż przejęcia',
|
||||
},
|
||||
},
|
||||
en_DK: {
|
||||
action: {
|
||||
showEnnoblements: 'Show ennoblements',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export default () =>
|
||||
translations[window.game_data.locale] || translations.en_DK;
|
|
@ -0,0 +1,30 @@
|
|||
const translations = {
|
||||
pl_PL: {
|
||||
title: `Historia`,
|
||||
date: 'Data',
|
||||
tribe: 'Plemię',
|
||||
points: 'Punkty',
|
||||
rank: 'Ranking',
|
||||
villages: 'Liczba wiosek',
|
||||
members: 'Liczba członków',
|
||||
oda: 'Pokonani przeciwnicy jako agresor',
|
||||
odd: 'Pokonani przeciwnicy jako obrońca',
|
||||
ods: 'Pokonani przeciwnicy jako wspierający',
|
||||
od: 'Pokonani przeciwnicy',
|
||||
},
|
||||
en_DK: {
|
||||
title: `History`,
|
||||
date: 'Date',
|
||||
tribe: 'Tribe',
|
||||
points: 'Points',
|
||||
villages: 'Villages',
|
||||
members: 'Members',
|
||||
oda: 'ODA',
|
||||
odd: 'ODD',
|
||||
ods: 'ODS',
|
||||
od: 'OD',
|
||||
},
|
||||
};
|
||||
|
||||
export default () =>
|
||||
translations[window.game_data.locale] || translations.en_DK;
|
Reference in New Issue