add some styles to player history table | showLastEnnoblements and extendedPlayerProfile is working on all lang versions now
This commit is contained in:
parent
c958f615cf
commit
de7ba6fe7a
9
dist/extendedPlayerProfile.js
vendored
9
dist/extendedPlayerProfile.js
vendored
|
@ -735,11 +735,10 @@ 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 0.6
|
||||
// @version 0.61
|
||||
// @description Extended Player Profile
|
||||
// @author Kichiyaki http://dawid-wysokinski.pl/
|
||||
// @match *://*.plemiona.pl/game.php*&screen=info_player*
|
||||
// @match *://*.tribalwars.net/game.php*&screen=info_player*
|
||||
// @match *://*/game.php*&screen=info_player*
|
||||
// @grant none
|
||||
// @run-at document-end
|
||||
// ==/UserScript==
|
||||
|
@ -1028,7 +1027,7 @@ const renderPlayerHistory = (e, currentPage, playerHistory, playerDailyStats) =>
|
|||
limit: PLAYER_HISTORY_PER_PAGE,
|
||||
currentPage
|
||||
});
|
||||
const html = "\n <div id=\"".concat(PLAYER_HISTORY_PAGINATION_CONTAINER_ID, "\">\n ").concat(paginationItems.join(''), "\n </div>\n <table class=\"vis\">\n <tbody>\n <tr>\n <th>\n Date\n </th>\n <th>\n Tribe\n </th>\n <th>\n Rank\n </th>\n <th>\n Points\n </th>\n <th>\n Villages\n </th>\n <th>\n OD\n </th>\n <th>\n ODA\n </th>\n <th>\n ODD\n </th>\n <th>\n ODS\n </th>\n </tr>\n ").concat(playerHistory.items.map(playerHistory => {
|
||||
const html = "\n <div id=\"".concat(PLAYER_HISTORY_PAGINATION_CONTAINER_ID, "\">\n ").concat(paginationItems.join(''), "\n </div>\n <table class=\"vis\" style=\"border-collapse: separate; border-spacing: 2px;\">\n <tbody>\n <tr>\n <th>\n Date\n </th>\n <th>\n Tribe\n </th>\n <th>\n Points\n </th>\n <th>\n Villages\n </th>\n <th>\n OD\n </th>\n <th>\n ODA\n </th>\n <th>\n ODD\n </th>\n <th>\n ODS\n </th>\n </tr>\n ").concat(playerHistory.items.map(playerHistory => {
|
||||
const subtracted = (0, _subDays.default)(new Date(playerHistory.createDate), 1).toISOString().split('.')[0] + 'Z';
|
||||
const stats = playerDailyStats.items.find(stats => {
|
||||
return stats.createDate === subtracted;
|
||||
|
@ -1045,7 +1044,7 @@ const renderPlayerHistory = (e, currentPage, playerHistory, playerDailyStats) =>
|
|||
rowHTML += '<td>-</td>';
|
||||
}
|
||||
|
||||
rowHTML += "\n <td>\n ".concat(playerHistory.rank, ".\n </td>\n <td title=\"").concat(stats ? addMathSymbol(stats.points) : '', "\">\n ").concat(playerHistory.points.toLocaleString(), "\n </td>\n <td title=\"").concat(stats ? addMathSymbol(stats.villages) : '', "\">\n ").concat(playerHistory.totalVillages, "\n </td>\n <td title=\"").concat(stats ? addMathSymbol(stats.scoreTotal) : '', "\">\n ").concat(playerHistory.scoreTotal.toLocaleString(), " (").concat(playerHistory.rankTotal, ")\n </td>\n <td title=\"").concat(stats ? addMathSymbol(stats.scoreAtt) : '', "\">\n ").concat(playerHistory.scoreAtt.toLocaleString(), " (").concat(playerHistory.rankAtt, ")\n </td>\n <td title=\"").concat(stats ? addMathSymbol(stats.scoreDef) : '', "\">\n ").concat(playerHistory.scoreDef.toLocaleString(), " (").concat(playerHistory.rankDef, ")\n </td>\n <td title=\"").concat(stats ? addMathSymbol(stats.scoreSup) : '', "\">\n ").concat(playerHistory.scoreSup.toLocaleString(), " (").concat(playerHistory.rankSup, ")\n </td>\n ") + '</tr>';
|
||||
rowHTML += "\n <td title=\"".concat(stats ? addMathSymbol(stats.points) : '', "\">\n ").concat(playerHistory.points.toLocaleString(), " (<strong>").concat(playerHistory.rank, "</strong>)\n </td>\n <td title=\"").concat(stats ? addMathSymbol(stats.villages) : '', "\">\n ").concat(playerHistory.totalVillages, "\n </td>\n <td title=\"").concat(stats ? addMathSymbol(stats.scoreTotal) : '', "\">\n ").concat(playerHistory.scoreTotal.toLocaleString(), " (<strong>").concat(playerHistory.rankTotal, "</strong>)\n </td>\n <td title=\"").concat(stats ? addMathSymbol(stats.scoreAtt) : '', "\">\n ").concat(playerHistory.scoreAtt.toLocaleString(), " (<strong>").concat(playerHistory.rankAtt, "</strong>)\n </td>\n <td title=\"").concat(stats ? addMathSymbol(stats.scoreDef) : '', "\">\n ").concat(playerHistory.scoreDef.toLocaleString(), " (<strong>").concat(playerHistory.rankDef, "</strong>)\n </td>\n <td title=\"").concat(stats ? addMathSymbol(stats.scoreSup) : '', "\">\n ").concat(playerHistory.scoreSup.toLocaleString(), " (<strong>").concat(playerHistory.rankSup, "</strong>)\n </td>\n ") + '</tr>';
|
||||
return rowHTML;
|
||||
}).join(''), "\n </tbody>\n </table>\n ");
|
||||
(0, _renderPopup.default)({
|
||||
|
|
5
dist/latestEnnoblements.js
vendored
5
dist/latestEnnoblements.js
vendored
|
@ -445,11 +445,10 @@ 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/latestEnnoblements.js
|
||||
// @downloadURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/latestEnnoblements.js
|
||||
// @version 0.5
|
||||
// @version 0.51
|
||||
// @description Show the latest ennoblements
|
||||
// @author Kichiyaki http://dawid-wysokinski.pl/ | Icon author *GD*
|
||||
// @match *://*.plemiona.pl/game.php*
|
||||
// @match *://*.tribalwars.net/game.php*
|
||||
// @match *://*/game.php*
|
||||
// @grant none
|
||||
// @run-at document-end
|
||||
// ==/UserScript==
|
||||
|
|
|
@ -14,11 +14,10 @@ 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 0.6
|
||||
// @version 0.61
|
||||
// @description Extended Player Profile
|
||||
// @author Kichiyaki http://dawid-wysokinski.pl/
|
||||
// @match *://*.plemiona.pl/game.php*&screen=info_player*
|
||||
// @match *://*.tribalwars.net/game.php*&screen=info_player*
|
||||
// @match *://*/game.php*&screen=info_player*
|
||||
// @grant none
|
||||
// @run-at document-end
|
||||
// ==/UserScript==
|
||||
|
@ -666,7 +665,7 @@ const renderPlayerHistory = (
|
|||
<div id="${PLAYER_HISTORY_PAGINATION_CONTAINER_ID}">
|
||||
${paginationItems.join('')}
|
||||
</div>
|
||||
<table class="vis">
|
||||
<table class="vis" style="border-collapse: separate; border-spacing: 2px;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>
|
||||
|
@ -675,9 +674,6 @@ const renderPlayerHistory = (
|
|||
<th>
|
||||
Tribe
|
||||
</th>
|
||||
<th>
|
||||
Rank
|
||||
</th>
|
||||
<th>
|
||||
Points
|
||||
</th>
|
||||
|
@ -723,34 +719,33 @@ const renderPlayerHistory = (
|
|||
}
|
||||
rowHTML +=
|
||||
`
|
||||
<td>
|
||||
${playerHistory.rank}.
|
||||
</td>
|
||||
<td title="${stats ? addMathSymbol(stats.points) : ''}">
|
||||
${playerHistory.points.toLocaleString()}
|
||||
${playerHistory.points.toLocaleString()} (<strong>${
|
||||
playerHistory.rank
|
||||
}</strong>)
|
||||
</td>
|
||||
<td title="${stats ? addMathSymbol(stats.villages) : ''}">
|
||||
${playerHistory.totalVillages}
|
||||
</td>
|
||||
<td title="${stats ? addMathSymbol(stats.scoreTotal) : ''}">
|
||||
${playerHistory.scoreTotal.toLocaleString()} (${
|
||||
${playerHistory.scoreTotal.toLocaleString()} (<strong>${
|
||||
playerHistory.rankTotal
|
||||
})
|
||||
}</strong>)
|
||||
</td>
|
||||
<td title="${stats ? addMathSymbol(stats.scoreAtt) : ''}">
|
||||
${playerHistory.scoreAtt.toLocaleString()} (${
|
||||
${playerHistory.scoreAtt.toLocaleString()} (<strong>${
|
||||
playerHistory.rankAtt
|
||||
})
|
||||
}</strong>)
|
||||
</td>
|
||||
<td title="${stats ? addMathSymbol(stats.scoreDef) : ''}">
|
||||
${playerHistory.scoreDef.toLocaleString()} (${
|
||||
${playerHistory.scoreDef.toLocaleString()} (<strong>${
|
||||
playerHistory.rankDef
|
||||
})
|
||||
}</strong>)
|
||||
</td>
|
||||
<td title="${stats ? addMathSymbol(stats.scoreSup) : ''}">
|
||||
${playerHistory.scoreSup.toLocaleString()} (${
|
||||
${playerHistory.scoreSup.toLocaleString()} (<strong>${
|
||||
playerHistory.rankSup
|
||||
})
|
||||
}</strong>)
|
||||
</td>
|
||||
` + '</tr>';
|
||||
|
||||
|
|
|
@ -14,11 +14,10 @@ import { setItem, getItem } from './utils/localStorage';
|
|||
// @namespace https://github.com/tribalwarshelp/scripts
|
||||
// @updateURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/latestEnnoblements.js
|
||||
// @downloadURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/latestEnnoblements.js
|
||||
// @version 0.5
|
||||
// @version 0.51
|
||||
// @description Show the latest ennoblements
|
||||
// @author Kichiyaki http://dawid-wysokinski.pl/ | Icon author *GD*
|
||||
// @match *://*.plemiona.pl/game.php*
|
||||
// @match *://*.tribalwars.net/game.php*
|
||||
// @match *://*/game.php*
|
||||
// @grant none
|
||||
// @run-at document-end
|
||||
// ==/UserScript==
|
||||
|
|
Reference in New Issue
Block a user