add info about a new stat tracking website - TWHelp
This commit is contained in:
parent
210a70b56c
commit
b169968105
4
dist/bonusBarbarianVillageFinder.js
vendored
4
dist/bonusBarbarianVillageFinder.js
vendored
|
@ -293,9 +293,9 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
||||||
// @namespace https://github.com/tribalwarshelp/scripts
|
// @namespace https://github.com/tribalwarshelp/scripts
|
||||||
// @updateURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/bonusBarbarianVillageFinder.js
|
// @updateURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/bonusBarbarianVillageFinder.js
|
||||||
// @downloadURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/bonusBarbarianVillageFinder.js
|
// @downloadURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/bonusBarbarianVillageFinder.js
|
||||||
// @version 0.4.3
|
// @version 0.4.4
|
||||||
// @description Bonus barbarian village finder
|
// @description Bonus barbarian village finder
|
||||||
// @author Kichiyaki http://dawid-wysokinski.pl/
|
// @author Kichiyaki https://dawid-wysokinski.pl/
|
||||||
// @match *://*/game.php*screen=map*
|
// @match *://*/game.php*screen=map*
|
||||||
// @grant none
|
// @grant none
|
||||||
// ==/UserScript==
|
// ==/UserScript==
|
||||||
|
|
4
dist/commandRenamer.js
vendored
4
dist/commandRenamer.js
vendored
|
@ -163,9 +163,9 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
||||||
// @namespace https://github.com/tribalwarshelp/scripts
|
// @namespace https://github.com/tribalwarshelp/scripts
|
||||||
// @updateURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/commandRenamer.js
|
// @updateURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/commandRenamer.js
|
||||||
// @downloadURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/commandRenamer.js
|
// @downloadURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/commandRenamer.js
|
||||||
// @version 0.2.0
|
// @version 0.2.1
|
||||||
// @description Command renamer
|
// @description Command renamer
|
||||||
// @author Kichiyaki http://dawid-wysokinski.pl/
|
// @author Kichiyaki https://dawid-wysokinski.pl/
|
||||||
// @match *://*/game.php*mode=incomings*
|
// @match *://*/game.php*mode=incomings*
|
||||||
// @grant none
|
// @grant none
|
||||||
// ==/UserScript==
|
// ==/UserScript==
|
||||||
|
|
86
dist/dailyAchievements.js
vendored
86
dist/dailyAchievements.js
vendored
|
@ -2949,7 +2949,8 @@ const translations = {
|
||||||
aotd: 'Agresor dnia',
|
aotd: 'Agresor dnia',
|
||||||
dotd: 'Obrońca dnia',
|
dotd: 'Obrońca dnia',
|
||||||
sotd: 'Pomocnik dnia',
|
sotd: 'Pomocnik dnia',
|
||||||
gpotd: 'Mocarstwo dnia'
|
gpotd: 'Mocarstwo dnia',
|
||||||
|
devNote: 'Informacja od autora - Właśnie uruchomiłem nową stronę ze statystykami, nie zapomnij jej sprawdzić :).'
|
||||||
},
|
},
|
||||||
en_DK: {
|
en_DK: {
|
||||||
title: 'Daily achievements - probable players',
|
title: 'Daily achievements - probable players',
|
||||||
|
@ -2957,7 +2958,8 @@ const translations = {
|
||||||
aotd: 'Attacker of the day',
|
aotd: 'Attacker of the day',
|
||||||
dotd: 'Defender of the day',
|
dotd: 'Defender of the day',
|
||||||
sotd: 'Supporter of the day',
|
sotd: 'Supporter of the day',
|
||||||
gpotd: 'Great power of the day'
|
gpotd: 'Great power of the day',
|
||||||
|
devNote: "Information from the author - I've just launched a new stat tracking website, don't forget to check it out :)."
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -3057,6 +3059,20 @@ exports.default = void 0;
|
||||||
|
|
||||||
var _default = () => window.location.host.split('.')[0];
|
var _default = () => window.location.host.split('.')[0];
|
||||||
|
|
||||||
|
exports.default = _default;
|
||||||
|
},{}],"J1Ly":[function(require,module,exports) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
Object.defineProperty(exports, "__esModule", {
|
||||||
|
value: true
|
||||||
|
});
|
||||||
|
exports.default = void 0;
|
||||||
|
|
||||||
|
var _default = function _default() {
|
||||||
|
let server = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
||||||
|
return server.substr(0, 2);
|
||||||
|
};
|
||||||
|
|
||||||
exports.default = _default;
|
exports.default = _default;
|
||||||
},{}],"ZbyX":[function(require,module,exports) {
|
},{}],"ZbyX":[function(require,module,exports) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
@ -3082,6 +3098,60 @@ const inUTC = function inUTC() {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.inUTC = inUTC;
|
exports.inUTC = inUTC;
|
||||||
|
},{}],"gvXE":[function(require,module,exports) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
Object.defineProperty(exports, "__esModule", {
|
||||||
|
value: true
|
||||||
|
});
|
||||||
|
exports.buildVillageURL = exports.buildTribeURL = exports.buildPlayerURL = exports.buildURLToProfile = exports.buildURLToServerPage = exports.BASE_URL = void 0;
|
||||||
|
const BASE_URL = 'tribalwarshelp.com';
|
||||||
|
exports.BASE_URL = BASE_URL;
|
||||||
|
|
||||||
|
const buildURLToServerPage = function buildURLToServerPage() {
|
||||||
|
let version = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
||||||
|
let server = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
||||||
|
return "https://".concat(version, ".").concat(BASE_URL, "/server/").concat(server);
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.buildURLToServerPage = buildURLToServerPage;
|
||||||
|
|
||||||
|
const buildURLToProfile = function buildURLToProfile() {
|
||||||
|
let version = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
||||||
|
let server = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
||||||
|
let id = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
||||||
|
let entity = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '';
|
||||||
|
return "".concat(buildURLToServerPage(version, server), "/").concat(entity, "/").concat(id);
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.buildURLToProfile = buildURLToProfile;
|
||||||
|
|
||||||
|
const buildPlayerURL = function buildPlayerURL() {
|
||||||
|
let version = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
||||||
|
let server = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
||||||
|
let id = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
||||||
|
return buildURLToProfile(version, server, id, 'player');
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.buildPlayerURL = buildPlayerURL;
|
||||||
|
|
||||||
|
const buildTribeURL = function buildTribeURL() {
|
||||||
|
let version = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
||||||
|
let server = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
||||||
|
let id = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
||||||
|
return buildURLToProfile(version, server, id, 'tribe');
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.buildTribeURL = buildTribeURL;
|
||||||
|
|
||||||
|
const buildVillageURL = function buildVillageURL() {
|
||||||
|
let version = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
||||||
|
let server = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
||||||
|
let id = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
||||||
|
return buildURLToProfile(version, server, id, 'village');
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.buildVillageURL = buildVillageURL;
|
||||||
},{}],"Jg9g":[function(require,module,exports) {
|
},{}],"Jg9g":[function(require,module,exports) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
@ -3097,8 +3167,12 @@ var _tribalwars = require("./utils/tribalwars");
|
||||||
|
|
||||||
var _getCurrentServer = _interopRequireDefault(require("./utils/getCurrentServer"));
|
var _getCurrentServer = _interopRequireDefault(require("./utils/getCurrentServer"));
|
||||||
|
|
||||||
|
var _getServerVersionCode = _interopRequireDefault(require("./utils/getServerVersionCode"));
|
||||||
|
|
||||||
var _date = require("./utils/date");
|
var _date = require("./utils/date");
|
||||||
|
|
||||||
|
var _twhelp = require("./utils/twhelp");
|
||||||
|
|
||||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||||
|
|
||||||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
||||||
|
@ -3112,9 +3186,9 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
||||||
// @namespace https://github.com/tribalwarshelp/scripts
|
// @namespace https://github.com/tribalwarshelp/scripts
|
||||||
// @updateURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/dailyAchievements.js
|
// @updateURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/dailyAchievements.js
|
||||||
// @downloadURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/dailyAchievements.js
|
// @downloadURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/dailyAchievements.js
|
||||||
// @version 0.4.2
|
// @version 0.4.3
|
||||||
// @description Daily achievements
|
// @description Daily achievements
|
||||||
// @author Kichiyaki http://dawid-wysokinski.pl/
|
// @author Kichiyaki https://dawid-wysokinski.pl/
|
||||||
// @match *://*/game.php*screen=info_player&mode=awards*
|
// @match *://*/game.php*screen=info_player&mode=awards*
|
||||||
// @grant none
|
// @grant none
|
||||||
// ==/UserScript==
|
// ==/UserScript==
|
||||||
|
@ -3165,7 +3239,7 @@ const render = (_ref) => {
|
||||||
dailyPlayerStatsOrderedByScoreSup,
|
dailyPlayerStatsOrderedByScoreSup,
|
||||||
dailyPlayerStatsOrderedByVillages
|
dailyPlayerStatsOrderedByVillages
|
||||||
} = _ref;
|
} = _ref;
|
||||||
const html = "\n <div class=\"award-group-head\">".concat(translations.title, "</div>\n <div class=\"award-group-content\" style=\"text-align: center;\">\n <div style=\"padding: 10px;\">\n <h3 style=\"color: red;\"><strong>").concat(translations.warning, "</strong></h3>\n <p><strong>").concat(translations.aotd, "</strong></p>\n ").concat(dailyPlayerStatsOrderedByScoreAtt.items.map((item, index) => "<span>".concat(index + 1, ". <a href=\"").concat((0, _tribalwars.formatPlayerURL)(item.player.id), "\">").concat(item.player.name, " - ").concat(item.scoreAtt.toLocaleString(), "</a></span>")).join('<br>'), "\n </div>\n <hr>\n <div style=\"padding: 10px;\">\n <p><strong>").concat(translations.dotd, "</strong></p>\n ").concat(dailyPlayerStatsOrderedByScoreDef.items.map((item, index) => "<span>".concat(index + 1, ". <a href=\"").concat((0, _tribalwars.formatPlayerURL)(item.player.id), "\">").concat(item.player.name, " - ").concat(item.scoreDef.toLocaleString(), "</a></span>")).join('<br>'), "\n </div>\n <hr>\n <div style=\"padding: 10px;\">\n <p><strong>").concat(translations.sotd, "</strong></p>\n ").concat(dailyPlayerStatsOrderedByScoreSup.items.map((item, index) => "<span>".concat(index + 1, ". <a href=\"").concat((0, _tribalwars.formatPlayerURL)(item.player.id), "\">").concat(item.player.name, " - ").concat(item.scoreSup.toLocaleString(), "</a></span>")).join('<br>'), "\n </div>\n <hr>\n <div style=\"padding: 10px;\">\n <p><strong>").concat(translations.gpotd, "</strong></p>\n ").concat(dailyPlayerStatsOrderedByVillages.items.map((item, index) => "<span>".concat(index + 1, ". <a href=\"").concat((0, _tribalwars.formatPlayerURL)(item.player.id), "\">").concat(item.player.name, " - ").concat(item.villages.toLocaleString(), "</a></span>")).join('<br>'), "\n </div>\n </div>\n <div class=\"award-group-foot\"></div>\n ");
|
const html = "\n <div class=\"award-group-head\">".concat(translations.title, "</div>\n <div class=\"award-group-content\" style=\"text-align: center;\">\n <div style=\"padding: 10px;\">\n <h1 style=\"margin-bottom: 0px;\"><a href=\"").concat((0, _twhelp.buildURLToServerPage)((0, _getServerVersionCode.default)(SERVER), SERVER), "\">TWHelp</a></h1>\n <h3 style=\"margin-bottom: 10px; margin-top: 0;\">").concat(translations.devNote, "</h3>\n <h3 style=\"color: red;\"><strong>").concat(translations.warning, "</strong></h3>\n <p><strong>").concat(translations.aotd, "</strong></p>\n ").concat(dailyPlayerStatsOrderedByScoreAtt.items.map((item, index) => "<span>".concat(index + 1, ". <a href=\"").concat((0, _tribalwars.formatPlayerURL)(item.player.id), "\">").concat(item.player.name, " - ").concat(item.scoreAtt.toLocaleString(), "</a></span>")).join('<br>'), "\n </div>\n <hr>\n <div style=\"padding: 10px;\">\n <p><strong>").concat(translations.dotd, "</strong></p>\n ").concat(dailyPlayerStatsOrderedByScoreDef.items.map((item, index) => "<span>".concat(index + 1, ". <a href=\"").concat((0, _tribalwars.formatPlayerURL)(item.player.id), "\">").concat(item.player.name, " - ").concat(item.scoreDef.toLocaleString(), "</a></span>")).join('<br>'), "\n </div>\n <hr>\n <div style=\"padding: 10px;\">\n <p><strong>").concat(translations.sotd, "</strong></p>\n ").concat(dailyPlayerStatsOrderedByScoreSup.items.map((item, index) => "<span>".concat(index + 1, ". <a href=\"").concat((0, _tribalwars.formatPlayerURL)(item.player.id), "\">").concat(item.player.name, " - ").concat(item.scoreSup.toLocaleString(), "</a></span>")).join('<br>'), "\n </div>\n <hr>\n <div style=\"padding: 10px;\">\n <p><strong>").concat(translations.gpotd, "</strong></p>\n ").concat(dailyPlayerStatsOrderedByVillages.items.map((item, index) => "<span>".concat(index + 1, ". <a href=\"").concat((0, _tribalwars.formatPlayerURL)(item.player.id), "\">").concat(item.player.name, " - ").concat(item.villages.toLocaleString(), "</a></span>")).join('<br>'), "\n </div>\n </div>\n <div class=\"award-group-foot\"></div>\n ");
|
||||||
|
|
||||||
if (!container) {
|
if (!container) {
|
||||||
container = document.createElement('div');
|
container = document.createElement('div');
|
||||||
|
@ -3193,4 +3267,4 @@ const render = (_ref) => {
|
||||||
console.log('dailyAchievements', error);
|
console.log('dailyAchievements', error);
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
},{"date-fns/format":"OZJZ","./libs/requestCreator":"Ph2E","./i18n/dailyAchievments":"rX6I","./utils/localStorage":"KWxH","./utils/tribalwars":"fHHP","./utils/getCurrentServer":"DMkL","./utils/date":"ZbyX"}]},{},["Jg9g"], null)
|
},{"date-fns/format":"OZJZ","./libs/requestCreator":"Ph2E","./i18n/dailyAchievments":"rX6I","./utils/localStorage":"KWxH","./utils/tribalwars":"fHHP","./utils/getCurrentServer":"DMkL","./utils/getServerVersionCode":"J1Ly","./utils/date":"ZbyX","./utils/twhelp":"gvXE"}]},{},["Jg9g"], null)
|
4
dist/extendedMapPopup.js
vendored
4
dist/extendedMapPopup.js
vendored
|
@ -675,9 +675,9 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
||||||
// @namespace https://github.com/tribalwarshelp/scripts
|
// @namespace https://github.com/tribalwarshelp/scripts
|
||||||
// @updateURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/extendedMapPopup.js
|
// @updateURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/extendedMapPopup.js
|
||||||
// @downloadURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/extendedMapPopup.js
|
// @downloadURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/extendedMapPopup.js
|
||||||
// @version 0.6.3
|
// @version 0.6.4
|
||||||
// @description Extended map popup
|
// @description Extended map popup
|
||||||
// @author Kichiyaki http://dawid-wysokinski.pl/
|
// @author Kichiyaki https://dawid-wysokinski.pl/
|
||||||
// @match *://*/game.php*screen=map*
|
// @match *://*/game.php*screen=map*
|
||||||
// @grant none
|
// @grant none
|
||||||
// ==/UserScript==
|
// ==/UserScript==
|
||||||
|
|
84
dist/extendedPlayerProfile.js
vendored
84
dist/extendedPlayerProfile.js
vendored
|
@ -276,6 +276,7 @@ const translations = {
|
||||||
exportedVillages: 'Wyeksportowane wioski',
|
exportedVillages: 'Wyeksportowane wioski',
|
||||||
tribeChanges: 'Zmiany plemion',
|
tribeChanges: 'Zmiany plemion',
|
||||||
action: {
|
action: {
|
||||||
|
linkToTWHelp: 'Akta gracza - TWHelp - nowa strona ze statystykami i narzędziami',
|
||||||
showTribeChanges: 'Pokaż zmiany plemion',
|
showTribeChanges: 'Pokaż zmiany plemion',
|
||||||
showEnnoblements: 'Pokaż przejęcia',
|
showEnnoblements: 'Pokaż przejęcia',
|
||||||
exportVillages: 'Wyeksportuj wioski',
|
exportVillages: 'Wyeksportuj wioski',
|
||||||
|
@ -305,6 +306,7 @@ const translations = {
|
||||||
exportedVillages: 'Exported villages',
|
exportedVillages: 'Exported villages',
|
||||||
tribeChanges: 'Tribe changes',
|
tribeChanges: 'Tribe changes',
|
||||||
action: {
|
action: {
|
||||||
|
linkToTWHelp: 'User file (external link) - TWHelp - A new stat tracking website.',
|
||||||
showTribeChanges: 'Show tribe changes',
|
showTribeChanges: 'Show tribe changes',
|
||||||
showEnnoblements: 'Show ennoblements',
|
showEnnoblements: 'Show ennoblements',
|
||||||
exportVillages: 'Export villages',
|
exportVillages: 'Export villages',
|
||||||
|
@ -1037,6 +1039,20 @@ exports.default = void 0;
|
||||||
|
|
||||||
var _default = () => window.location.host.split('.')[0];
|
var _default = () => window.location.host.split('.')[0];
|
||||||
|
|
||||||
|
exports.default = _default;
|
||||||
|
},{}],"J1Ly":[function(require,module,exports) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
Object.defineProperty(exports, "__esModule", {
|
||||||
|
value: true
|
||||||
|
});
|
||||||
|
exports.default = void 0;
|
||||||
|
|
||||||
|
var _default = function _default() {
|
||||||
|
let server = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
||||||
|
return server.substr(0, 2);
|
||||||
|
};
|
||||||
|
|
||||||
exports.default = _default;
|
exports.default = _default;
|
||||||
},{}],"Syko":[function(require,module,exports) {
|
},{}],"Syko":[function(require,module,exports) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
@ -1053,6 +1069,60 @@ const formatPlayerURL = function formatPlayerURL() {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.formatPlayerURL = formatPlayerURL;
|
exports.formatPlayerURL = formatPlayerURL;
|
||||||
|
},{}],"gvXE":[function(require,module,exports) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
Object.defineProperty(exports, "__esModule", {
|
||||||
|
value: true
|
||||||
|
});
|
||||||
|
exports.buildVillageURL = exports.buildTribeURL = exports.buildPlayerURL = exports.buildURLToProfile = exports.buildURLToServerPage = exports.BASE_URL = void 0;
|
||||||
|
const BASE_URL = 'tribalwarshelp.com';
|
||||||
|
exports.BASE_URL = BASE_URL;
|
||||||
|
|
||||||
|
const buildURLToServerPage = function buildURLToServerPage() {
|
||||||
|
let version = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
||||||
|
let server = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
||||||
|
return "https://".concat(version, ".").concat(BASE_URL, "/server/").concat(server);
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.buildURLToServerPage = buildURLToServerPage;
|
||||||
|
|
||||||
|
const buildURLToProfile = function buildURLToProfile() {
|
||||||
|
let version = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
||||||
|
let server = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
||||||
|
let id = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
||||||
|
let entity = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '';
|
||||||
|
return "".concat(buildURLToServerPage(version, server), "/").concat(entity, "/").concat(id);
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.buildURLToProfile = buildURLToProfile;
|
||||||
|
|
||||||
|
const buildPlayerURL = function buildPlayerURL() {
|
||||||
|
let version = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
||||||
|
let server = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
||||||
|
let id = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
||||||
|
return buildURLToProfile(version, server, id, 'player');
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.buildPlayerURL = buildPlayerURL;
|
||||||
|
|
||||||
|
const buildTribeURL = function buildTribeURL() {
|
||||||
|
let version = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
||||||
|
let server = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
||||||
|
let id = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
||||||
|
return buildURLToProfile(version, server, id, 'tribe');
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.buildTribeURL = buildTribeURL;
|
||||||
|
|
||||||
|
const buildVillageURL = function buildVillageURL() {
|
||||||
|
let version = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
||||||
|
let server = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
||||||
|
let id = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
||||||
|
return buildURLToProfile(version, server, id, 'village');
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.buildVillageURL = buildVillageURL;
|
||||||
},{}],"KWxH":[function(require,module,exports) {
|
},{}],"KWxH":[function(require,module,exports) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
@ -1105,12 +1175,16 @@ var _getIDFromURL = _interopRequireDefault(require("./utils/getIDFromURL"));
|
||||||
|
|
||||||
var _getCurrentServer = _interopRequireDefault(require("./utils/getCurrentServer"));
|
var _getCurrentServer = _interopRequireDefault(require("./utils/getCurrentServer"));
|
||||||
|
|
||||||
|
var _getServerVersionCode = _interopRequireDefault(require("./utils/getServerVersionCode"));
|
||||||
|
|
||||||
var _formatDate = _interopRequireDefault(require("./utils/formatDate"));
|
var _formatDate = _interopRequireDefault(require("./utils/formatDate"));
|
||||||
|
|
||||||
var _twstats = require("./utils/twstats");
|
var _twstats = require("./utils/twstats");
|
||||||
|
|
||||||
var _tribalwars = require("./utils/tribalwars");
|
var _tribalwars = require("./utils/tribalwars");
|
||||||
|
|
||||||
|
var _twhelp = require("./utils/twhelp");
|
||||||
|
|
||||||
var _localStorage = require("./utils/localStorage");
|
var _localStorage = require("./utils/localStorage");
|
||||||
|
|
||||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||||
|
@ -1124,9 +1198,9 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
||||||
// @namespace https://github.com/tribalwarshelp/scripts
|
// @namespace https://github.com/tribalwarshelp/scripts
|
||||||
// @downloadURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/extendedPlayerProfile.js
|
// @downloadURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/extendedPlayerProfile.js
|
||||||
// @updateURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/extendedPlayerProfile.js
|
// @updateURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/extendedPlayerProfile.js
|
||||||
// @version 1.1.5
|
// @version 1.1.6
|
||||||
// @description Extended player profile
|
// @description Extended player profile
|
||||||
// @author Kichiyaki http://dawid-wysokinski.pl/
|
// @author Kichiyaki https://dawid-wysokinski.pl/
|
||||||
// @match *://*/game.php*screen=info_player*
|
// @match *://*/game.php*screen=info_player*
|
||||||
// @grant none
|
// @grant none
|
||||||
// @run-at document-end
|
// @run-at document-end
|
||||||
|
@ -1476,6 +1550,10 @@ const wrapAction = action => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const renderActions = () => {
|
const renderActions = () => {
|
||||||
|
const linkToTWHelp = document.createElement('a');
|
||||||
|
linkToTWHelp.href = (0, _twhelp.buildPlayerURL)((0, _getServerVersionCode.default)(SERVER), SERVER, PLAYER_ID);
|
||||||
|
linkToTWHelp.innerHTML = translations.action.linkToTWHelp;
|
||||||
|
actionContainer.appendChild(wrapAction(linkToTWHelp));
|
||||||
const showTribeChanges = document.createElement('a');
|
const showTribeChanges = document.createElement('a');
|
||||||
showTribeChanges.href = '#';
|
showTribeChanges.href = '#';
|
||||||
(0, _pagination.setPage)(showTribeChanges, '1');
|
(0, _pagination.setPage)(showTribeChanges, '1');
|
||||||
|
@ -1519,4 +1597,4 @@ const renderActions = () => {
|
||||||
console.log('extended player profile', error);
|
console.log('extended player profile', error);
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
},{"./libs/InADayParser":"dSAr","./libs/requestCreator":"Ph2E","./i18n/extendedPlayerProfile":"I8dv","./common/renderTodaysStats":"yrCm","./utils/showPopup":"chDM","./common/showEnnoblementsPopup":"vNT1","./common/showHistoryPopup":"kEDU","./utils/hyphensToCamelCase":"GxsT","./utils/pagination":"fCHX","./utils/getIDFromURL":"tQUs","./utils/getCurrentServer":"DMkL","./utils/formatDate":"V6Mf","./utils/twstats":"Syko","./utils/tribalwars":"fHHP","./utils/localStorage":"KWxH"}]},{},["yRop"], null)
|
},{"./libs/InADayParser":"dSAr","./libs/requestCreator":"Ph2E","./i18n/extendedPlayerProfile":"I8dv","./common/renderTodaysStats":"yrCm","./utils/showPopup":"chDM","./common/showEnnoblementsPopup":"vNT1","./common/showHistoryPopup":"kEDU","./utils/hyphensToCamelCase":"GxsT","./utils/pagination":"fCHX","./utils/getIDFromURL":"tQUs","./utils/getCurrentServer":"DMkL","./utils/getServerVersionCode":"J1Ly","./utils/formatDate":"V6Mf","./utils/twstats":"Syko","./utils/tribalwars":"fHHP","./utils/twhelp":"gvXE","./utils/localStorage":"KWxH"}]},{},["yRop"], null)
|
121
dist/extendedTribeProfile.js
vendored
121
dist/extendedTribeProfile.js
vendored
|
@ -928,6 +928,7 @@ const translations = {
|
||||||
dailyGrowth: 'Dzienny przyrost',
|
dailyGrowth: 'Dzienny przyrost',
|
||||||
playerLinks: 'Linki',
|
playerLinks: 'Linki',
|
||||||
action: {
|
action: {
|
||||||
|
linkToTWHelp: 'Akta plemienia - TWHelp - nowa strona ze statystykami i narzędziami',
|
||||||
showTribeChanges: 'Pokaż zmiany plemion',
|
showTribeChanges: 'Pokaż zmiany plemion',
|
||||||
showEnnoblements: 'Pokaż przejęcia',
|
showEnnoblements: 'Pokaż przejęcia',
|
||||||
showMembersGrowth: 'Pokaż rozwój graczy',
|
showMembersGrowth: 'Pokaż rozwój graczy',
|
||||||
|
@ -964,6 +965,7 @@ const translations = {
|
||||||
dailyGrowth: 'Daily growth',
|
dailyGrowth: 'Daily growth',
|
||||||
playerLinks: 'Player links',
|
playerLinks: 'Player links',
|
||||||
action: {
|
action: {
|
||||||
|
linkToTWHelp: 'Tribal file (external link) - TWHelp - A new stat tracking website.',
|
||||||
showTribeChanges: 'Show tribe changes',
|
showTribeChanges: 'Show tribe changes',
|
||||||
showEnnoblements: 'Show ennoblements',
|
showEnnoblements: 'Show ennoblements',
|
||||||
showMembersGrowth: 'Show members growth',
|
showMembersGrowth: 'Show members growth',
|
||||||
|
@ -1683,6 +1685,20 @@ const setItem = (key, payload) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.setItem = setItem;
|
exports.setItem = setItem;
|
||||||
|
},{}],"J1Ly":[function(require,module,exports) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
Object.defineProperty(exports, "__esModule", {
|
||||||
|
value: true
|
||||||
|
});
|
||||||
|
exports.default = void 0;
|
||||||
|
|
||||||
|
var _default = function _default() {
|
||||||
|
let server = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
||||||
|
return server.substr(0, 2);
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.default = _default;
|
||||||
},{}],"Syko":[function(require,module,exports) {
|
},{}],"Syko":[function(require,module,exports) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
@ -1698,6 +1714,60 @@ const formatPlayerURL = function formatPlayerURL() {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.formatPlayerURL = formatPlayerURL;
|
exports.formatPlayerURL = formatPlayerURL;
|
||||||
|
},{}],"gvXE":[function(require,module,exports) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
Object.defineProperty(exports, "__esModule", {
|
||||||
|
value: true
|
||||||
|
});
|
||||||
|
exports.buildVillageURL = exports.buildTribeURL = exports.buildPlayerURL = exports.buildURLToProfile = exports.buildURLToServerPage = exports.BASE_URL = void 0;
|
||||||
|
const BASE_URL = 'tribalwarshelp.com';
|
||||||
|
exports.BASE_URL = BASE_URL;
|
||||||
|
|
||||||
|
const buildURLToServerPage = function buildURLToServerPage() {
|
||||||
|
let version = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
||||||
|
let server = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
||||||
|
return "https://".concat(version, ".").concat(BASE_URL, "/server/").concat(server);
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.buildURLToServerPage = buildURLToServerPage;
|
||||||
|
|
||||||
|
const buildURLToProfile = function buildURLToProfile() {
|
||||||
|
let version = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
||||||
|
let server = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
||||||
|
let id = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
||||||
|
let entity = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '';
|
||||||
|
return "".concat(buildURLToServerPage(version, server), "/").concat(entity, "/").concat(id);
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.buildURLToProfile = buildURLToProfile;
|
||||||
|
|
||||||
|
const buildPlayerURL = function buildPlayerURL() {
|
||||||
|
let version = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
||||||
|
let server = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
||||||
|
let id = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
||||||
|
return buildURLToProfile(version, server, id, 'player');
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.buildPlayerURL = buildPlayerURL;
|
||||||
|
|
||||||
|
const buildTribeURL = function buildTribeURL() {
|
||||||
|
let version = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
||||||
|
let server = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
||||||
|
let id = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
||||||
|
return buildURLToProfile(version, server, id, 'tribe');
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.buildTribeURL = buildTribeURL;
|
||||||
|
|
||||||
|
const buildVillageURL = function buildVillageURL() {
|
||||||
|
let version = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
||||||
|
let server = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
||||||
|
let id = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
||||||
|
return buildURLToProfile(version, server, id, 'village');
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.buildVillageURL = buildVillageURL;
|
||||||
},{}],"r4nF":[function(require,module,exports) {
|
},{}],"r4nF":[function(require,module,exports) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
@ -1727,8 +1797,12 @@ var _localStorage = require("./utils/localStorage");
|
||||||
|
|
||||||
var _formatDate = _interopRequireDefault(require("./utils/formatDate"));
|
var _formatDate = _interopRequireDefault(require("./utils/formatDate"));
|
||||||
|
|
||||||
|
var _getServerVersionCode = _interopRequireDefault(require("./utils/getServerVersionCode"));
|
||||||
|
|
||||||
var _twstats = require("./utils/twstats");
|
var _twstats = require("./utils/twstats");
|
||||||
|
|
||||||
|
var _twhelp = require("./utils/twhelp");
|
||||||
|
|
||||||
var _tribalwars = require("./utils/tribalwars");
|
var _tribalwars = require("./utils/tribalwars");
|
||||||
|
|
||||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||||
|
@ -1744,14 +1818,15 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
||||||
// @namespace https://github.com/tribalwarshelp/scripts
|
// @namespace https://github.com/tribalwarshelp/scripts
|
||||||
// @updateURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/extendedTribeProfile.js
|
// @updateURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/extendedTribeProfile.js
|
||||||
// @downloadURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/extendedTribeProfile.js
|
// @downloadURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/extendedTribeProfile.js
|
||||||
// @version 1.0.9
|
// @version 1.1.0
|
||||||
// @description Extended tribe profile
|
// @description Extended tribe profile
|
||||||
// @author Kichiyaki http://dawid-wysokinski.pl/
|
// @author Kichiyaki https://dawid-wysokinski.pl/
|
||||||
// @match *://*/game.php*screen=info_ally*
|
// @match *://*/game.php*screen=info_ally*
|
||||||
// @grant none
|
// @grant none
|
||||||
// @run-at document-end
|
// @run-at document-end
|
||||||
// ==/UserScript==
|
// ==/UserScript==
|
||||||
const SERVER = (0, _getCurrentServer.default)();
|
const SERVER = (0, _getCurrentServer.default)();
|
||||||
|
const VERSION = (0, _getServerVersionCode.default)(SERVER);
|
||||||
const TRIBE_ID = (0, _getIDFromURL.default)(window.location.search);
|
const TRIBE_ID = (0, _getIDFromURL.default)(window.location.search);
|
||||||
const LOCAL_STORAGE_KEY = 'kichiyaki_extended_tribe_profile' + TRIBE_ID;
|
const LOCAL_STORAGE_KEY = 'kichiyaki_extended_tribe_profile' + TRIBE_ID;
|
||||||
const TRIBE_QUERY = "\n query tribe($server: String!, $id: Int!, $dailyTribeStatsSort: [String!], $dailyTribeStatsLimit: Int, $playerSort: [String!], $playerFilter: PlayerFilter!, $dailyTribeStatsFilter: DailyTribeStatsFilter!) {\n tribe(server: $server, id: $id) {\n id\n bestRank\n bestRankAt\n mostPoints\n mostPointsAt\n mostVillages\n mostVillagesAt\n createdAt\n dominance\n }\n dailyTribeStats(server: $server, limit: $dailyTribeStatsLimit, sort: $dailyTribeStatsSort, filter: $dailyTribeStatsFilter) {\n items {\n rank\n rankAtt\n rankDef\n rankTotal\n points\n scoreAtt\n scoreAtt\n scoreDef\n scoreTotal\n villages\n members\n }\n }\n players(server: $server, sort: $playerSort, filter: $playerFilter) {\n items {\n id\n rankAtt\n rankDef\n rankSup\n rankTotal\n scoreAtt\n scoreAtt\n scoreDef\n scoreSup\n scoreTotal\n dailyGrowth\n }\n }\n }\n";
|
const TRIBE_QUERY = "\n query tribe($server: String!, $id: Int!, $dailyTribeStatsSort: [String!], $dailyTribeStatsLimit: Int, $playerSort: [String!], $playerFilter: PlayerFilter!, $dailyTribeStatsFilter: DailyTribeStatsFilter!) {\n tribe(server: $server, id: $id) {\n id\n bestRank\n bestRankAt\n mostPoints\n mostPointsAt\n mostVillages\n mostVillagesAt\n createdAt\n dominance\n }\n dailyTribeStats(server: $server, limit: $dailyTribeStatsLimit, sort: $dailyTribeStatsSort, filter: $dailyTribeStatsFilter) {\n items {\n rank\n rankAtt\n rankDef\n rankTotal\n points\n scoreAtt\n scoreAtt\n scoreDef\n scoreTotal\n villages\n members\n }\n }\n players(server: $server, sort: $playerSort, filter: $playerFilter) {\n items {\n id\n rankAtt\n rankDef\n rankSup\n rankTotal\n scoreAtt\n scoreAtt\n scoreDef\n scoreSup\n scoreTotal\n dailyGrowth\n }\n }\n }\n";
|
||||||
|
@ -1765,7 +1840,7 @@ const TRIBE_CHANGES_QUERY = "\n query tribeChanges($server: String!, $limit:
|
||||||
const TRIBE_CHANGES_PAGINATION_CONTAINER_ID = 'tribeChangesPagination';
|
const TRIBE_CHANGES_PAGINATION_CONTAINER_ID = 'tribeChangesPagination';
|
||||||
const TRIBE_CHANGES_PER_PAGE = 15;
|
const TRIBE_CHANGES_PER_PAGE = 15;
|
||||||
const profileInfoTBody = document.querySelector('#content_value > table:nth-child(3) > tbody > tr > td:nth-child(1) > table > tbody');
|
const profileInfoTBody = document.querySelector('#content_value > table:nth-child(3) > tbody > tr > td:nth-child(1) > table > tbody');
|
||||||
const actionsContainer = profileInfoTBody;
|
const actionContainer = profileInfoTBody;
|
||||||
const otherElementsContainer = document.querySelector('#content_value > table:nth-child(3) > tbody > tr > td:nth-child(2)');
|
const otherElementsContainer = document.querySelector('#content_value > table:nth-child(3) > tbody > tr > td:nth-child(2)');
|
||||||
const membersContainer = document.querySelector('#content_value > table.vis > tbody');
|
const membersContainer = document.querySelector('#content_value > table.vis > tbody');
|
||||||
const translations = (0, _extendedTribeProfile.default)();
|
const translations = (0, _extendedTribeProfile.default)();
|
||||||
|
@ -1866,7 +1941,13 @@ const extendMembersData = players => {
|
||||||
const player = players.items.find(p => p.id === playerID);
|
const player = players.items.find(p => p.id === playerID);
|
||||||
|
|
||||||
if (player) {
|
if (player) {
|
||||||
[[player.scoreAtt, player.rankAtt], [player.scoreDef, player.rankDef], [player.scoreSup, player.rankSup], [player.scoreTotal, player.rankTotal], player.dailyGrowth, [(0, _twstats.formatPlayerURL)(SERVER, player.id), 'TWStats']].forEach((data, index) => {
|
[[player.scoreAtt, player.rankAtt], [player.scoreDef, player.rankDef], [player.scoreSup, player.rankSup], [player.scoreTotal, player.rankTotal], player.dailyGrowth, [{
|
||||||
|
link: (0, _twhelp.buildPlayerURL)(VERSION, SERVER, player.id),
|
||||||
|
label: 'TWHelp'
|
||||||
|
}, {
|
||||||
|
link: (0, _twstats.formatPlayerURL)(SERVER, player.id),
|
||||||
|
label: 'TWStats'
|
||||||
|
}]].forEach((data, index) => {
|
||||||
let td = tr.children[5 + index];
|
let td = tr.children[5 + index];
|
||||||
|
|
||||||
if (!td) {
|
if (!td) {
|
||||||
|
@ -1877,8 +1958,14 @@ const extendMembersData = players => {
|
||||||
if (Array.isArray(data)) {
|
if (Array.isArray(data)) {
|
||||||
if (typeof data[0] === 'number') {
|
if (typeof data[0] === 'number') {
|
||||||
td.innerHTML = "".concat(data[0].toLocaleString(), " (<strong>").concat(data[1], "</strong>)");
|
td.innerHTML = "".concat(data[0].toLocaleString(), " (<strong>").concat(data[1], "</strong>)");
|
||||||
} else if ((0, _isURL.default)(data[0])) {
|
} else if (data[0].link) {
|
||||||
td.innerHTML = "<a target=\"_blank\" rel=\"noopener noreferrer\" href=\"".concat(data[0], "\">").concat(data[1], "</a>");
|
td.innerHTML = data.map((_ref2) => {
|
||||||
|
let {
|
||||||
|
link,
|
||||||
|
label
|
||||||
|
} = _ref2;
|
||||||
|
return "<a target=\"_blank\" rel=\"noopener noreferrer\" href=\"".concat(link, "\">").concat(label, "</a>");
|
||||||
|
}).join('<br>');
|
||||||
}
|
}
|
||||||
} else if (typeof data === 'number') {
|
} else if (typeof data === 'number') {
|
||||||
td.innerHTML = data.toLocaleString();
|
td.innerHTML = data.toLocaleString();
|
||||||
|
@ -1888,12 +1975,12 @@ const extendMembersData = players => {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const render = (_ref2) => {
|
const render = (_ref3) => {
|
||||||
let {
|
let {
|
||||||
tribe,
|
tribe,
|
||||||
dailyTribeStats,
|
dailyTribeStats,
|
||||||
players
|
players
|
||||||
} = _ref2;
|
} = _ref3;
|
||||||
[{
|
[{
|
||||||
title: translations.createdAt + ':',
|
title: translations.createdAt + ':',
|
||||||
data: (0, _formatDate.default)(tribe.createdAt),
|
data: (0, _formatDate.default)(tribe.createdAt),
|
||||||
|
@ -2273,39 +2360,43 @@ const wrapAction = action => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const renderActions = () => {
|
const renderActions = () => {
|
||||||
|
const linkToTWHelp = document.createElement('a');
|
||||||
|
linkToTWHelp.href = (0, _twhelp.buildTribeURL)(VERSION, SERVER, TRIBE_ID);
|
||||||
|
linkToTWHelp.innerHTML = translations.action.linkToTWHelp;
|
||||||
|
actionContainer.appendChild(wrapAction(linkToTWHelp));
|
||||||
const showEnnoblements = document.createElement('a');
|
const showEnnoblements = document.createElement('a');
|
||||||
showEnnoblements.href = '#';
|
showEnnoblements.href = '#';
|
||||||
(0, _pagination.setPage)(showEnnoblements, '1');
|
(0, _pagination.setPage)(showEnnoblements, '1');
|
||||||
showEnnoblements.innerHTML = translations.action.showEnnoblements;
|
showEnnoblements.innerHTML = translations.action.showEnnoblements;
|
||||||
showEnnoblements.addEventListener('click', handleShowTribeEnnoblementsClick);
|
showEnnoblements.addEventListener('click', handleShowTribeEnnoblementsClick);
|
||||||
actionsContainer.appendChild(wrapAction(showEnnoblements));
|
actionContainer.appendChild(wrapAction(showEnnoblements));
|
||||||
const showHistory = document.createElement('a');
|
const showHistory = document.createElement('a');
|
||||||
showHistory.href = '#';
|
showHistory.href = '#';
|
||||||
(0, _pagination.setPage)(showHistory, '1');
|
(0, _pagination.setPage)(showHistory, '1');
|
||||||
showHistory.innerHTML = translations.action.showHistory;
|
showHistory.innerHTML = translations.action.showHistory;
|
||||||
showHistory.addEventListener('click', handleShowTribeHistoryClick);
|
showHistory.addEventListener('click', handleShowTribeHistoryClick);
|
||||||
actionsContainer.appendChild(wrapAction(showHistory));
|
actionContainer.appendChild(wrapAction(showHistory));
|
||||||
const showTribeChanges = document.createElement('a');
|
const showTribeChanges = document.createElement('a');
|
||||||
showTribeChanges.href = '#';
|
showTribeChanges.href = '#';
|
||||||
(0, _pagination.setPage)(showTribeChanges, '1');
|
(0, _pagination.setPage)(showTribeChanges, '1');
|
||||||
showTribeChanges.innerHTML = translations.action.showTribeChanges;
|
showTribeChanges.innerHTML = translations.action.showTribeChanges;
|
||||||
showTribeChanges.addEventListener('click', handleShowTribeChangesClick);
|
showTribeChanges.addEventListener('click', handleShowTribeChangesClick);
|
||||||
actionsContainer.appendChild(wrapAction(showTribeChanges));
|
actionContainer.appendChild(wrapAction(showTribeChanges));
|
||||||
const showMembersGrowth = document.createElement('a');
|
const showMembersGrowth = document.createElement('a');
|
||||||
showMembersGrowth.href = '#';
|
showMembersGrowth.href = '#';
|
||||||
showMembersGrowth.innerHTML = translations.action.showMembersGrowth;
|
showMembersGrowth.innerHTML = translations.action.showMembersGrowth;
|
||||||
showMembersGrowth.addEventListener('click', handleShowMembersGrowthClick);
|
showMembersGrowth.addEventListener('click', handleShowMembersGrowthClick);
|
||||||
actionsContainer.appendChild(wrapAction(showMembersGrowth));
|
actionContainer.appendChild(wrapAction(showMembersGrowth));
|
||||||
const generateMailingList = document.createElement('a');
|
const generateMailingList = document.createElement('a');
|
||||||
generateMailingList.href = '#';
|
generateMailingList.href = '#';
|
||||||
generateMailingList.innerHTML = translations.action.generateMailingList;
|
generateMailingList.innerHTML = translations.action.generateMailingList;
|
||||||
generateMailingList.addEventListener('click', handleGenerateMailingListClick);
|
generateMailingList.addEventListener('click', handleGenerateMailingListClick);
|
||||||
actionsContainer.appendChild(wrapAction(generateMailingList));
|
actionContainer.appendChild(wrapAction(generateMailingList));
|
||||||
const exportVillages = document.createElement('a');
|
const exportVillages = document.createElement('a');
|
||||||
exportVillages.href = '#';
|
exportVillages.href = '#';
|
||||||
exportVillages.innerHTML = translations.action.exportVillages;
|
exportVillages.innerHTML = translations.action.exportVillages;
|
||||||
exportVillages.addEventListener('click', handleExportTribeVillagesClick);
|
exportVillages.addEventListener('click', handleExportTribeVillagesClick);
|
||||||
actionsContainer.appendChild(wrapAction(exportVillages));
|
actionContainer.appendChild(wrapAction(exportVillages));
|
||||||
};
|
};
|
||||||
|
|
||||||
(async function () {
|
(async function () {
|
||||||
|
@ -2327,4 +2418,4 @@ const renderActions = () => {
|
||||||
console.log('extended tribe profile', error);
|
console.log('extended tribe profile', error);
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
},{"validator/lib/isURL":"XMVV","date-fns/differenceInDays":"mdVI","./i18n/extendedTribeProfile":"iFDG","./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)
|
},{"validator/lib/isURL":"XMVV","date-fns/differenceInDays":"mdVI","./i18n/extendedTribeProfile":"iFDG","./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/getServerVersionCode":"J1Ly","./utils/twstats":"Syko","./utils/twhelp":"gvXE","./utils/tribalwars":"fHHP"}]},{},["r4nF"], null)
|
86
dist/extendedVillageProfile.js
vendored
86
dist/extendedVillageProfile.js
vendored
|
@ -176,6 +176,7 @@ const translations = {
|
||||||
ennobledAt: 'Podbita o',
|
ennobledAt: 'Podbita o',
|
||||||
never: 'Nigdy',
|
never: 'Nigdy',
|
||||||
action: {
|
action: {
|
||||||
|
linkToTWHelp: 'Akta wioski - TWHelp - nowa strona ze statystykami i narzędziami',
|
||||||
showEnnoblements: 'Pokaż przejęcia',
|
showEnnoblements: 'Pokaż przejęcia',
|
||||||
countIncomingSupport: 'Policz nadchodzące wsparcie'
|
countIncomingSupport: 'Policz nadchodzące wsparcie'
|
||||||
}
|
}
|
||||||
|
@ -190,6 +191,7 @@ const translations = {
|
||||||
never: 'Never',
|
never: 'Never',
|
||||||
ennobledAt: 'Ennobled at',
|
ennobledAt: 'Ennobled at',
|
||||||
action: {
|
action: {
|
||||||
|
linkToTWHelp: 'Village file (external link) - TWHelp - A new stat tracking website.',
|
||||||
showEnnoblements: 'Show ennoblements',
|
showEnnoblements: 'Show ennoblements',
|
||||||
countIncomingSupport: 'Count incoming support'
|
countIncomingSupport: 'Count incoming support'
|
||||||
}
|
}
|
||||||
|
@ -627,7 +629,75 @@ var _default = (ennobledAt, speed) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.default = _default;
|
exports.default = _default;
|
||||||
},{"date-fns/differenceInMinutes":"oGJj"}],"tKRp":[function(require,module,exports) {
|
},{"date-fns/differenceInMinutes":"oGJj"}],"J1Ly":[function(require,module,exports) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
Object.defineProperty(exports, "__esModule", {
|
||||||
|
value: true
|
||||||
|
});
|
||||||
|
exports.default = void 0;
|
||||||
|
|
||||||
|
var _default = function _default() {
|
||||||
|
let server = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
||||||
|
return server.substr(0, 2);
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.default = _default;
|
||||||
|
},{}],"gvXE":[function(require,module,exports) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
Object.defineProperty(exports, "__esModule", {
|
||||||
|
value: true
|
||||||
|
});
|
||||||
|
exports.buildVillageURL = exports.buildTribeURL = exports.buildPlayerURL = exports.buildURLToProfile = exports.buildURLToServerPage = exports.BASE_URL = void 0;
|
||||||
|
const BASE_URL = 'tribalwarshelp.com';
|
||||||
|
exports.BASE_URL = BASE_URL;
|
||||||
|
|
||||||
|
const buildURLToServerPage = function buildURLToServerPage() {
|
||||||
|
let version = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
||||||
|
let server = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
||||||
|
return "https://".concat(version, ".").concat(BASE_URL, "/server/").concat(server);
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.buildURLToServerPage = buildURLToServerPage;
|
||||||
|
|
||||||
|
const buildURLToProfile = function buildURLToProfile() {
|
||||||
|
let version = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
||||||
|
let server = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
||||||
|
let id = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
||||||
|
let entity = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '';
|
||||||
|
return "".concat(buildURLToServerPage(version, server), "/").concat(entity, "/").concat(id);
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.buildURLToProfile = buildURLToProfile;
|
||||||
|
|
||||||
|
const buildPlayerURL = function buildPlayerURL() {
|
||||||
|
let version = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
||||||
|
let server = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
||||||
|
let id = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
||||||
|
return buildURLToProfile(version, server, id, 'player');
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.buildPlayerURL = buildPlayerURL;
|
||||||
|
|
||||||
|
const buildTribeURL = function buildTribeURL() {
|
||||||
|
let version = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
||||||
|
let server = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
||||||
|
let id = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
||||||
|
return buildURLToProfile(version, server, id, 'tribe');
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.buildTribeURL = buildTribeURL;
|
||||||
|
|
||||||
|
const buildVillageURL = function buildVillageURL() {
|
||||||
|
let version = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
||||||
|
let server = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
||||||
|
let id = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
||||||
|
return buildURLToProfile(version, server, id, 'village');
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.buildVillageURL = buildVillageURL;
|
||||||
|
},{}],"tKRp":[function(require,module,exports) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
Object.defineProperty(exports, "__esModule", {
|
Object.defineProperty(exports, "__esModule", {
|
||||||
|
@ -789,6 +859,10 @@ var _localStorage = require("./utils/localStorage");
|
||||||
|
|
||||||
var _countLoyalty = _interopRequireDefault(require("./utils/countLoyalty"));
|
var _countLoyalty = _interopRequireDefault(require("./utils/countLoyalty"));
|
||||||
|
|
||||||
|
var _getServerVersionCode = _interopRequireDefault(require("./utils/getServerVersionCode"));
|
||||||
|
|
||||||
|
var _twhelp = require("./utils/twhelp");
|
||||||
|
|
||||||
var _showEnnoblementsPopup = _interopRequireDefault(require("./common/showEnnoblementsPopup"));
|
var _showEnnoblementsPopup = _interopRequireDefault(require("./common/showEnnoblementsPopup"));
|
||||||
|
|
||||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||||
|
@ -804,9 +878,9 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
||||||
// @namespace https://github.com/tribalwarshelp/scripts
|
// @namespace https://github.com/tribalwarshelp/scripts
|
||||||
// @updateURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/extendedVillageProfile.js
|
// @updateURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/extendedVillageProfile.js
|
||||||
// @downloadURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/extendedVillageProfile.js
|
// @downloadURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/extendedVillageProfile.js
|
||||||
// @version 0.7.2
|
// @version 0.7.3
|
||||||
// @description Extended village profile
|
// @description Extended village profile
|
||||||
// @author Kichiyaki http://dawid-wysokinski.pl/
|
// @author Kichiyaki https://dawid-wysokinski.pl/
|
||||||
// @match *://*/game.php*screen=info_village*
|
// @match *://*/game.php*screen=info_village*
|
||||||
// @grant none
|
// @grant none
|
||||||
// @run-at document-end
|
// @run-at document-end
|
||||||
|
@ -1004,6 +1078,10 @@ const wrapAction = action => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const renderActions = () => {
|
const renderActions = () => {
|
||||||
|
const linkToTWHelp = document.createElement('a');
|
||||||
|
linkToTWHelp.href = (0, _twhelp.buildVillageURL)((0, _getServerVersionCode.default)(SERVER), SERVER, VILLAGE_ID);
|
||||||
|
linkToTWHelp.innerHTML = translations.action.linkToTWHelp;
|
||||||
|
actionContainer.appendChild(wrapAction(linkToTWHelp));
|
||||||
const showEnnoblementsPopup = document.createElement('a');
|
const showEnnoblementsPopup = document.createElement('a');
|
||||||
showEnnoblementsPopup.href = '#';
|
showEnnoblementsPopup.href = '#';
|
||||||
(0, _pagination.setPage)(showEnnoblementsPopup, '1');
|
(0, _pagination.setPage)(showEnnoblementsPopup, '1');
|
||||||
|
@ -1100,4 +1178,4 @@ const renderAdditionalInfo = function renderAdditionalInfo() {
|
||||||
console.log('extended village profile', error);
|
console.log('extended village profile', error);
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
},{"./libs/requestCreator":"Ph2E","./i18n/extendedVillageProfile":"LNef","./utils/pagination":"fCHX","./utils/getCurrentServer":"DMkL","./utils/getIDFromURL":"tQUs","./utils/buildUnitImgURL":"KX6P","./utils/formatDate":"V6Mf","./utils/wait":"oUdd","./utils/localStorage":"KWxH","./utils/countLoyalty":"ATOB","./common/showEnnoblementsPopup":"vNT1"}]},{},["UdfQ"], null)
|
},{"./libs/requestCreator":"Ph2E","./i18n/extendedVillageProfile":"LNef","./utils/pagination":"fCHX","./utils/getCurrentServer":"DMkL","./utils/getIDFromURL":"tQUs","./utils/buildUnitImgURL":"KX6P","./utils/formatDate":"V6Mf","./utils/wait":"oUdd","./utils/localStorage":"KWxH","./utils/countLoyalty":"ATOB","./utils/getServerVersionCode":"J1Ly","./utils/twhelp":"gvXE","./common/showEnnoblementsPopup":"vNT1"}]},{},["UdfQ"], null)
|
4
dist/inADayTribeRankingGenerator.js
vendored
4
dist/inADayTribeRankingGenerator.js
vendored
|
@ -266,9 +266,9 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
||||||
// @namespace https://github.com/tribalwarshelp/scripts
|
// @namespace https://github.com/tribalwarshelp/scripts
|
||||||
// @updateURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/inADayTribeRankingGenerator.js
|
// @updateURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/inADayTribeRankingGenerator.js
|
||||||
// @downloadURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/inADayTribeRankingGenerator.js
|
// @downloadURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/inADayTribeRankingGenerator.js
|
||||||
// @version 0.2.0
|
// @version 0.2.1
|
||||||
// @description 'In A Day' tribe ranking generator
|
// @description 'In A Day' tribe ranking generator
|
||||||
// @author Kichiyaki http://dawid-wysokinski.pl/
|
// @author Kichiyaki https://dawid-wysokinski.pl/
|
||||||
// @match *://*/game.php*screen=ranking*mode=in_a_day*
|
// @match *://*/game.php*screen=ranking*mode=in_a_day*
|
||||||
// @grant none
|
// @grant none
|
||||||
// @run-at document-end
|
// @run-at document-end
|
||||||
|
|
86
dist/latestEnnoblements.js
vendored
86
dist/latestEnnoblements.js
vendored
|
@ -317,6 +317,74 @@ const setItem = (key, payload) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.setItem = setItem;
|
exports.setItem = setItem;
|
||||||
|
},{}],"gvXE":[function(require,module,exports) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
Object.defineProperty(exports, "__esModule", {
|
||||||
|
value: true
|
||||||
|
});
|
||||||
|
exports.buildVillageURL = exports.buildTribeURL = exports.buildPlayerURL = exports.buildURLToProfile = exports.buildURLToServerPage = exports.BASE_URL = void 0;
|
||||||
|
const BASE_URL = 'tribalwarshelp.com';
|
||||||
|
exports.BASE_URL = BASE_URL;
|
||||||
|
|
||||||
|
const buildURLToServerPage = function buildURLToServerPage() {
|
||||||
|
let version = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
||||||
|
let server = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
||||||
|
return "https://".concat(version, ".").concat(BASE_URL, "/server/").concat(server);
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.buildURLToServerPage = buildURLToServerPage;
|
||||||
|
|
||||||
|
const buildURLToProfile = function buildURLToProfile() {
|
||||||
|
let version = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
||||||
|
let server = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
||||||
|
let id = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
||||||
|
let entity = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '';
|
||||||
|
return "".concat(buildURLToServerPage(version, server), "/").concat(entity, "/").concat(id);
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.buildURLToProfile = buildURLToProfile;
|
||||||
|
|
||||||
|
const buildPlayerURL = function buildPlayerURL() {
|
||||||
|
let version = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
||||||
|
let server = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
||||||
|
let id = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
||||||
|
return buildURLToProfile(version, server, id, 'player');
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.buildPlayerURL = buildPlayerURL;
|
||||||
|
|
||||||
|
const buildTribeURL = function buildTribeURL() {
|
||||||
|
let version = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
||||||
|
let server = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
||||||
|
let id = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
||||||
|
return buildURLToProfile(version, server, id, 'tribe');
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.buildTribeURL = buildTribeURL;
|
||||||
|
|
||||||
|
const buildVillageURL = function buildVillageURL() {
|
||||||
|
let version = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
||||||
|
let server = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
||||||
|
let id = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
||||||
|
return buildURLToProfile(version, server, id, 'village');
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.buildVillageURL = buildVillageURL;
|
||||||
|
},{}],"J1Ly":[function(require,module,exports) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
Object.defineProperty(exports, "__esModule", {
|
||||||
|
value: true
|
||||||
|
});
|
||||||
|
exports.default = void 0;
|
||||||
|
|
||||||
|
var _default = function _default() {
|
||||||
|
let server = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
||||||
|
return server.substr(0, 2);
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.default = _default;
|
||||||
},{}],"FxgK":[function(require,module,exports) {
|
},{}],"FxgK":[function(require,module,exports) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
@ -335,7 +403,8 @@ const translations = {
|
||||||
date: 'Data',
|
date: 'Data',
|
||||||
filters: 'Filtry',
|
filters: 'Filtry',
|
||||||
apply: 'Zastosuj',
|
apply: 'Zastosuj',
|
||||||
ennoblements: 'Przejęcia'
|
ennoblements: 'Przejęcia',
|
||||||
|
devNote: 'Informacja od autora - Właśnie uruchomiłem nową stronę ze statystykami, nie zapomnij jej sprawdzić :).'
|
||||||
},
|
},
|
||||||
en_DK: {
|
en_DK: {
|
||||||
showLatestEnnoblements: 'Show latest ennoblements',
|
showLatestEnnoblements: 'Show latest ennoblements',
|
||||||
|
@ -347,7 +416,8 @@ const translations = {
|
||||||
filters: 'Filters',
|
filters: 'Filters',
|
||||||
date: 'Date',
|
date: 'Date',
|
||||||
apply: 'Apply',
|
apply: 'Apply',
|
||||||
ennoblements: 'Ennoblements'
|
ennoblements: 'Ennoblements',
|
||||||
|
devNote: "Information from the author - I've just launched a new stat tracking website, don't forget to check it out :)."
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -369,6 +439,10 @@ var _tribalwars = require("./utils/tribalwars");
|
||||||
|
|
||||||
var _localStorage = require("./utils/localStorage");
|
var _localStorage = require("./utils/localStorage");
|
||||||
|
|
||||||
|
var _twhelp = require("./utils/twhelp");
|
||||||
|
|
||||||
|
var _getServerVersionCode = _interopRequireDefault(require("./utils/getServerVersionCode"));
|
||||||
|
|
||||||
var _latestEnnoblements = _interopRequireDefault(require("./i18n/latestEnnoblements"));
|
var _latestEnnoblements = _interopRequireDefault(require("./i18n/latestEnnoblements"));
|
||||||
|
|
||||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||||
|
@ -384,9 +458,9 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
||||||
// @namespace https://github.com/tribalwarshelp/scripts
|
// @namespace https://github.com/tribalwarshelp/scripts
|
||||||
// @updateURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/latestEnnoblements.js
|
// @updateURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/latestEnnoblements.js
|
||||||
// @downloadURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/latestEnnoblements.js
|
// @downloadURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/latestEnnoblements.js
|
||||||
// @version 1.0.5
|
// @version 1.0.6
|
||||||
// @description Show the latest ennoblements
|
// @description Show the latest ennoblements
|
||||||
// @author Kichiyaki http://dawid-wysokinski.pl/
|
// @author Kichiyaki https://dawid-wysokinski.pl/
|
||||||
// @match *://*/game.php*
|
// @match *://*/game.php*
|
||||||
// @grant none
|
// @grant none
|
||||||
// @run-at document-end
|
// @run-at document-end
|
||||||
|
@ -514,7 +588,7 @@ const renderLatestEnnoblements = function renderLatestEnnoblements() {
|
||||||
|
|
||||||
const prepared = _objectSpread(_objectSpread({}, DEFAULT_FILTER), filters);
|
const prepared = _objectSpread(_objectSpread({}, DEFAULT_FILTER), filters);
|
||||||
|
|
||||||
const html = "\n <form style=\"margin-bottom: 15px\" id=\"".concat(FILTER_FORM_ID, "\">\n <h3 style=\"margin-bottom: 5px\">").concat(translations.filters, "</h3>\n <input type=\"text\" placeholder=\"").concat(translations.newOwner, "\" value=\"").concat(prepared.newOwner, "\" />\n <input type=\"text\" placeholder=\"").concat(translations.newOwnerTribe, "\" value=\"").concat(prepared.newOwnerTribe, "\" />\n <input type=\"text\" placeholder=\"").concat(translations.oldOwner, "\" value=\"").concat(prepared.oldOwner, "\" />\n <input type=\"text\" placeholder=\"").concat(translations.oldOwnerTribe, "\" value=\"").concat(prepared.oldOwnerTribe, "\" />\n <div>\n <button type=\"submit\">").concat(translations.apply, "</button>\n </div>\n </form>\n <table class=\"vis\" id=\"").concat(TABLE_ID, "\" style=\"width: 100%\">\n <thead>\n <tr>\n <th>").concat(translations.village, "</th>\n <th>").concat(translations.newOwner, "</th>\n <th>").concat(translations.oldOwner, "</th>\n <th>").concat(translations.date, "</th>\n </tr>\n </thead>\n <tbody>\n ").concat(formatEnnoblementRows(filterEnnoblements(ennoblements, prepared)).join(''), "\n </tbody>\n </table>\n ");
|
const html = "\n <form style=\"margin-bottom: 15px\" id=\"".concat(FILTER_FORM_ID, "\">\n <h1 style=\"margin-bottom: 0px; text-align: center;\"><a href=\"").concat((0, _twhelp.buildURLToServerPage)((0, _getServerVersionCode.default)(SERVER), SERVER), "\">TWHelp</a></h1>\n <h3 style=\"margin-bottom: 10px; margin-top: 0;\">").concat(translations.devNote, "</h3>\n <h3 style=\"margin-bottom: 5px\">").concat(translations.filters, "</h3>\n <input type=\"text\" placeholder=\"").concat(translations.newOwner, "\" value=\"").concat(prepared.newOwner, "\" />\n <input type=\"text\" placeholder=\"").concat(translations.newOwnerTribe, "\" value=\"").concat(prepared.newOwnerTribe, "\" />\n <input type=\"text\" placeholder=\"").concat(translations.oldOwner, "\" value=\"").concat(prepared.oldOwner, "\" />\n <input type=\"text\" placeholder=\"").concat(translations.oldOwnerTribe, "\" value=\"").concat(prepared.oldOwnerTribe, "\" />\n <div>\n <button type=\"submit\">").concat(translations.apply, "</button>\n </div>\n </form>\n <table class=\"vis\" id=\"").concat(TABLE_ID, "\" style=\"width: 100%\">\n <thead>\n <tr>\n <th>").concat(translations.village, "</th>\n <th>").concat(translations.newOwner, "</th>\n <th>").concat(translations.oldOwner, "</th>\n <th>").concat(translations.date, "</th>\n </tr>\n </thead>\n <tbody>\n ").concat(formatEnnoblementRows(filterEnnoblements(ennoblements, prepared)).join(''), "\n </tbody>\n </table>\n ");
|
||||||
(0, _showPopup.default)({
|
(0, _showPopup.default)({
|
||||||
e: {
|
e: {
|
||||||
clientY: 60
|
clientY: 60
|
||||||
|
@ -562,4 +636,4 @@ const renderButton = () => {
|
||||||
(function () {
|
(function () {
|
||||||
renderButton();
|
renderButton();
|
||||||
})();
|
})();
|
||||||
},{"./libs/requestCreator":"Ph2E","./utils/showPopup":"chDM","./utils/getCurrentServer":"DMkL","./utils/formatDate":"V6Mf","./utils/tribalwars":"fHHP","./utils/localStorage":"KWxH","./i18n/latestEnnoblements":"FxgK"}]},{},["hkfB"], null)
|
},{"./libs/requestCreator":"Ph2E","./utils/showPopup":"chDM","./utils/getCurrentServer":"DMkL","./utils/formatDate":"V6Mf","./utils/tribalwars":"fHHP","./utils/localStorage":"KWxH","./utils/twhelp":"gvXE","./utils/getServerVersionCode":"J1Ly","./i18n/latestEnnoblements":"FxgK"}]},{},["hkfB"], null)
|
10
dist/quickbar/dailyAchievements.js
vendored
10
dist/quickbar/dailyAchievements.js
vendored
File diff suppressed because one or more lines are too long
10
dist/quickbar/extendedPlayerProfile.js
vendored
10
dist/quickbar/extendedPlayerProfile.js
vendored
File diff suppressed because one or more lines are too long
10
dist/quickbar/extendedTribeProfile.js
vendored
10
dist/quickbar/extendedTribeProfile.js
vendored
File diff suppressed because one or more lines are too long
12
dist/quickbar/extendedVillageProfile.js
vendored
12
dist/quickbar/extendedVillageProfile.js
vendored
File diff suppressed because one or more lines are too long
10
dist/quickbar/latestEnnoblements.js
vendored
10
dist/quickbar/latestEnnoblements.js
vendored
File diff suppressed because one or more lines are too long
10
dist/quickbar/warStatsGenerator.js
vendored
10
dist/quickbar/warStatsGenerator.js
vendored
File diff suppressed because one or more lines are too long
86
dist/warStatsGenerator.js
vendored
86
dist/warStatsGenerator.js
vendored
|
@ -179,7 +179,8 @@ const translations = {
|
||||||
to: 'Do',
|
to: 'Do',
|
||||||
warStatsGenerator: 'Generator statystyk wojennych',
|
warStatsGenerator: 'Generator statystyk wojennych',
|
||||||
generateWarStats: 'Wygeneruj statystyki wojenne',
|
generateWarStats: 'Wygeneruj statystyki wojenne',
|
||||||
addTribe: 'Dodaj plemię'
|
addTribe: 'Dodaj plemię',
|
||||||
|
devNote: 'Informacja od autora - Właśnie uruchomiłem nową stronę ze statystykami, nie zapomnij jej sprawdzić :).'
|
||||||
},
|
},
|
||||||
en_DK: {
|
en_DK: {
|
||||||
conquers: 'Conquers',
|
conquers: 'Conquers',
|
||||||
|
@ -194,7 +195,8 @@ const translations = {
|
||||||
to: 'To',
|
to: 'To',
|
||||||
warStatsGenerator: 'War stats generator',
|
warStatsGenerator: 'War stats generator',
|
||||||
generateWarStats: 'Generate war stats',
|
generateWarStats: 'Generate war stats',
|
||||||
addTribe: 'Add tribe'
|
addTribe: 'Add tribe',
|
||||||
|
devNote: "Information from the author - I've just launched a new stat tracking website, don't forget to check it out :)."
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -212,6 +214,74 @@ exports.default = void 0;
|
||||||
var _default = () => window.location.host.split('.')[0];
|
var _default = () => window.location.host.split('.')[0];
|
||||||
|
|
||||||
exports.default = _default;
|
exports.default = _default;
|
||||||
|
},{}],"J1Ly":[function(require,module,exports) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
Object.defineProperty(exports, "__esModule", {
|
||||||
|
value: true
|
||||||
|
});
|
||||||
|
exports.default = void 0;
|
||||||
|
|
||||||
|
var _default = function _default() {
|
||||||
|
let server = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
||||||
|
return server.substr(0, 2);
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.default = _default;
|
||||||
|
},{}],"gvXE":[function(require,module,exports) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
Object.defineProperty(exports, "__esModule", {
|
||||||
|
value: true
|
||||||
|
});
|
||||||
|
exports.buildVillageURL = exports.buildTribeURL = exports.buildPlayerURL = exports.buildURLToProfile = exports.buildURLToServerPage = exports.BASE_URL = void 0;
|
||||||
|
const BASE_URL = 'tribalwarshelp.com';
|
||||||
|
exports.BASE_URL = BASE_URL;
|
||||||
|
|
||||||
|
const buildURLToServerPage = function buildURLToServerPage() {
|
||||||
|
let version = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
||||||
|
let server = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
||||||
|
return "https://".concat(version, ".").concat(BASE_URL, "/server/").concat(server);
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.buildURLToServerPage = buildURLToServerPage;
|
||||||
|
|
||||||
|
const buildURLToProfile = function buildURLToProfile() {
|
||||||
|
let version = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
||||||
|
let server = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
||||||
|
let id = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
||||||
|
let entity = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '';
|
||||||
|
return "".concat(buildURLToServerPage(version, server), "/").concat(entity, "/").concat(id);
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.buildURLToProfile = buildURLToProfile;
|
||||||
|
|
||||||
|
const buildPlayerURL = function buildPlayerURL() {
|
||||||
|
let version = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
||||||
|
let server = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
||||||
|
let id = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
||||||
|
return buildURLToProfile(version, server, id, 'player');
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.buildPlayerURL = buildPlayerURL;
|
||||||
|
|
||||||
|
const buildTribeURL = function buildTribeURL() {
|
||||||
|
let version = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
||||||
|
let server = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
||||||
|
let id = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
||||||
|
return buildURLToProfile(version, server, id, 'tribe');
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.buildTribeURL = buildTribeURL;
|
||||||
|
|
||||||
|
const buildVillageURL = function buildVillageURL() {
|
||||||
|
let version = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
||||||
|
let server = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
||||||
|
let id = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
||||||
|
return buildURLToProfile(version, server, id, 'village');
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.buildVillageURL = buildVillageURL;
|
||||||
},{}],"chDM":[function(require,module,exports) {
|
},{}],"chDM":[function(require,module,exports) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
@ -266,6 +336,10 @@ var _warStatsGenerator = _interopRequireDefault(require("./i18n/warStatsGenerato
|
||||||
|
|
||||||
var _getCurrentServer = _interopRequireDefault(require("./utils/getCurrentServer"));
|
var _getCurrentServer = _interopRequireDefault(require("./utils/getCurrentServer"));
|
||||||
|
|
||||||
|
var _getServerVersionCode = _interopRequireDefault(require("./utils/getServerVersionCode"));
|
||||||
|
|
||||||
|
var _twhelp = require("./utils/twhelp");
|
||||||
|
|
||||||
var _showPopup = _interopRequireWildcard(require("./utils/showPopup"));
|
var _showPopup = _interopRequireWildcard(require("./utils/showPopup"));
|
||||||
|
|
||||||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
||||||
|
@ -279,9 +353,9 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
||||||
// @namespace https://github.com/tribalwarshelp/scripts
|
// @namespace https://github.com/tribalwarshelp/scripts
|
||||||
// @updateURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/warStatsGenerator.js
|
// @updateURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/warStatsGenerator.js
|
||||||
// @downloadURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/warStatsGenerator.js
|
// @downloadURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/warStatsGenerator.js
|
||||||
// @version 0.3.0
|
// @version 0.3.1
|
||||||
// @description War stats generator
|
// @description War stats generator
|
||||||
// @author Kichiyaki http://dawid-wysokinski.pl/
|
// @author Kichiyaki https://dawid-wysokinski.pl/
|
||||||
// @match *://*/game.php*screen=ranking*mode=wars*
|
// @match *://*/game.php*screen=ranking*mode=wars*
|
||||||
// @grant none
|
// @grant none
|
||||||
// @run-at document-end
|
// @run-at document-end
|
||||||
|
@ -398,7 +472,7 @@ const handleFormSubmit = async e => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const showWarStatsForm = e => {
|
const showWarStatsForm = e => {
|
||||||
const html = "\n <form>\n <div id=\"".concat(RESULT_CONTAINER_ID, "\">\n </div>\n <div style=\"margin-bottom: 10px;\">\n <div id=\"").concat(FROM_INPUT_ID, "\">\n <label>").concat(translations.from, ": </label>\n <input type=\"date\" required />\n <input type=\"time\" required />\n </div>\n <div id=\"").concat(TO_INPUT_ID, "\">\n <label>").concat(translations.to, ": </label>\n <input type=\"date\" required />\n <input type=\"time\" required />\n </div>\n </div>\n <div style=\"display: flex; justify-content: space-between; margin-bottom: 10px; min-width: 800px;\">\n <div>\n <h3>").concat(translations.sideOne, "</h3>\n <div id=\"").concat(SIDE_ONE_INPUT_CONTAINER_ID, "\">\n </div>\n <button id=\"").concat(SIDE_ONE_BUTTON_ID, "\" class=\"btn\" type=\"button\">").concat(translations.addTribe, "</button>\n </div>\n <div style=\"margin: 0 5px;\"></div>\n <div>\n <h3>").concat(translations.sideTwo, "</h3>\n <div id=\"").concat(SIDE_TWO_INPUT_CONTAINER_ID, "\">\n </div>\n <button id=\"").concat(SIDE_TWO_BUTTON_ID, "\" class=\"btn\" type=\"button\">").concat(translations.addTribe, "</button>\n </div>\n </div>\n <div style=\"text-align: center;\">\n <button class=\"btn\" type=\"submit\">").concat(translations.generateWarStats, "</button>\n </div>\n </form>\n ");
|
const html = "\n <form>\n <h1 style=\"margin-bottom: 0px; text-align: center;\"><a href=\"".concat((0, _twhelp.buildURLToServerPage)((0, _getServerVersionCode.default)(SERVER), SERVER), "\">TWHelp</a></h1>\n <h3 style=\"margin-bottom: 10px; margin-top: 0;\">").concat(translations.devNote, "</h3>\n <div id=\"").concat(RESULT_CONTAINER_ID, "\">\n </div>\n <div style=\"margin-bottom: 10px;\">\n <div id=\"").concat(FROM_INPUT_ID, "\">\n <label>").concat(translations.from, ": </label>\n <input type=\"date\" required />\n <input type=\"time\" required />\n </div>\n <div id=\"").concat(TO_INPUT_ID, "\">\n <label>").concat(translations.to, ": </label>\n <input type=\"date\" required />\n <input type=\"time\" required />\n </div>\n </div>\n <div style=\"display: flex; justify-content: space-between; margin-bottom: 10px; min-width: 800px;\">\n <div>\n <h3>").concat(translations.sideOne, "</h3>\n <div id=\"").concat(SIDE_ONE_INPUT_CONTAINER_ID, "\">\n </div>\n <button id=\"").concat(SIDE_ONE_BUTTON_ID, "\" class=\"btn\" type=\"button\">").concat(translations.addTribe, "</button>\n </div>\n <div style=\"margin: 0 5px;\"></div>\n <div>\n <h3>").concat(translations.sideTwo, "</h3>\n <div id=\"").concat(SIDE_TWO_INPUT_CONTAINER_ID, "\">\n </div>\n <button id=\"").concat(SIDE_TWO_BUTTON_ID, "\" class=\"btn\" type=\"button\">").concat(translations.addTribe, "</button>\n </div>\n </div>\n <div style=\"text-align: center;\">\n <button class=\"btn\" type=\"submit\">").concat(translations.generateWarStats, "</button>\n </div>\n </form>\n ");
|
||||||
(0, _showPopup.default)({
|
(0, _showPopup.default)({
|
||||||
title: translations.warStatsGenerator,
|
title: translations.warStatsGenerator,
|
||||||
id: 'warStats',
|
id: 'warStats',
|
||||||
|
@ -426,4 +500,4 @@ const renderUI = () => {
|
||||||
console.log('war stats', error);
|
console.log('war stats', error);
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
},{"./libs/requestCreator":"Ph2E","./i18n/warStatsGenerator":"vPH5","./utils/getCurrentServer":"DMkL","./utils/showPopup":"chDM"}]},{},["H9GS"], null)
|
},{"./libs/requestCreator":"Ph2E","./i18n/warStatsGenerator":"vPH5","./utils/getCurrentServer":"DMkL","./utils/getServerVersionCode":"J1Ly","./utils/twhelp":"gvXE","./utils/showPopup":"chDM"}]},{},["H9GS"], null)
|
|
@ -9,9 +9,9 @@ import { calcDistanceBetweenTwoPoints } from './utils/math';
|
||||||
// @namespace https://github.com/tribalwarshelp/scripts
|
// @namespace https://github.com/tribalwarshelp/scripts
|
||||||
// @updateURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/bonusBarbarianVillageFinder.js
|
// @updateURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/bonusBarbarianVillageFinder.js
|
||||||
// @downloadURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/bonusBarbarianVillageFinder.js
|
// @downloadURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/bonusBarbarianVillageFinder.js
|
||||||
// @version 0.4.3
|
// @version 0.4.4
|
||||||
// @description Bonus barbarian village finder
|
// @description Bonus barbarian village finder
|
||||||
// @author Kichiyaki http://dawid-wysokinski.pl/
|
// @author Kichiyaki https://dawid-wysokinski.pl/
|
||||||
// @match *://*/game.php*screen=map*
|
// @match *://*/game.php*screen=map*
|
||||||
// @grant none
|
// @grant none
|
||||||
// ==/UserScript==
|
// ==/UserScript==
|
||||||
|
|
|
@ -6,9 +6,9 @@ import wait from './utils/wait';
|
||||||
// @namespace https://github.com/tribalwarshelp/scripts
|
// @namespace https://github.com/tribalwarshelp/scripts
|
||||||
// @updateURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/commandRenamer.js
|
// @updateURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/commandRenamer.js
|
||||||
// @downloadURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/commandRenamer.js
|
// @downloadURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/commandRenamer.js
|
||||||
// @version 0.2.0
|
// @version 0.2.1
|
||||||
// @description Command renamer
|
// @description Command renamer
|
||||||
// @author Kichiyaki http://dawid-wysokinski.pl/
|
// @author Kichiyaki https://dawid-wysokinski.pl/
|
||||||
// @match *://*/game.php*mode=incomings*
|
// @match *://*/game.php*mode=incomings*
|
||||||
// @grant none
|
// @grant none
|
||||||
// ==/UserScript==
|
// ==/UserScript==
|
||||||
|
|
|
@ -4,16 +4,18 @@ import getTranslations from './i18n/dailyAchievments';
|
||||||
import { setItem, getItem } from './utils/localStorage';
|
import { setItem, getItem } from './utils/localStorage';
|
||||||
import { formatPlayerURL } from './utils/tribalwars';
|
import { formatPlayerURL } from './utils/tribalwars';
|
||||||
import getCurrentServer from './utils/getCurrentServer';
|
import getCurrentServer from './utils/getCurrentServer';
|
||||||
|
import getServerVersionCode from './utils/getServerVersionCode';
|
||||||
import { inTZ } from './utils/date';
|
import { inTZ } from './utils/date';
|
||||||
|
import { buildURLToServerPage } from './utils/twhelp';
|
||||||
|
|
||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name Daily achievements
|
// @name Daily achievements
|
||||||
// @namespace https://github.com/tribalwarshelp/scripts
|
// @namespace https://github.com/tribalwarshelp/scripts
|
||||||
// @updateURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/dailyAchievements.js
|
// @updateURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/dailyAchievements.js
|
||||||
// @downloadURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/dailyAchievements.js
|
// @downloadURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/dailyAchievements.js
|
||||||
// @version 0.4.2
|
// @version 0.4.3
|
||||||
// @description Daily achievements
|
// @description Daily achievements
|
||||||
// @author Kichiyaki http://dawid-wysokinski.pl/
|
// @author Kichiyaki https://dawid-wysokinski.pl/
|
||||||
// @match *://*/game.php*screen=info_player&mode=awards*
|
// @match *://*/game.php*screen=info_player&mode=awards*
|
||||||
// @grant none
|
// @grant none
|
||||||
// ==/UserScript==
|
// ==/UserScript==
|
||||||
|
@ -118,6 +120,13 @@ const render = ({
|
||||||
<div class="award-group-head">${translations.title}</div>
|
<div class="award-group-head">${translations.title}</div>
|
||||||
<div class="award-group-content" style="text-align: center;">
|
<div class="award-group-content" style="text-align: center;">
|
||||||
<div style="padding: 10px;">
|
<div style="padding: 10px;">
|
||||||
|
<h1 style="margin-bottom: 0px;"><a href="${buildURLToServerPage(
|
||||||
|
getServerVersionCode(SERVER),
|
||||||
|
SERVER
|
||||||
|
)}">TWHelp</a></h1>
|
||||||
|
<h3 style="margin-bottom: 10px; margin-top: 0;">${
|
||||||
|
translations.devNote
|
||||||
|
}</h3>
|
||||||
<h3 style="color: red;"><strong>${
|
<h3 style="color: red;"><strong>${
|
||||||
translations.warning
|
translations.warning
|
||||||
}</strong></h3>
|
}</strong></h3>
|
||||||
|
|
|
@ -14,9 +14,9 @@ import countLoyalty from './utils/countLoyalty';
|
||||||
// @namespace https://github.com/tribalwarshelp/scripts
|
// @namespace https://github.com/tribalwarshelp/scripts
|
||||||
// @updateURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/extendedMapPopup.js
|
// @updateURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/extendedMapPopup.js
|
||||||
// @downloadURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/extendedMapPopup.js
|
// @downloadURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/extendedMapPopup.js
|
||||||
// @version 0.6.3
|
// @version 0.6.4
|
||||||
// @description Extended map popup
|
// @description Extended map popup
|
||||||
// @author Kichiyaki http://dawid-wysokinski.pl/
|
// @author Kichiyaki https://dawid-wysokinski.pl/
|
||||||
// @match *://*/game.php*screen=map*
|
// @match *://*/game.php*screen=map*
|
||||||
// @grant none
|
// @grant none
|
||||||
// ==/UserScript==
|
// ==/UserScript==
|
||||||
|
|
|
@ -14,9 +14,11 @@ import {
|
||||||
} from './utils/pagination';
|
} from './utils/pagination';
|
||||||
import getIDFromURL from './utils/getIDFromURL';
|
import getIDFromURL from './utils/getIDFromURL';
|
||||||
import getCurrentServer from './utils/getCurrentServer';
|
import getCurrentServer from './utils/getCurrentServer';
|
||||||
|
import getServerVersionCode from './utils/getServerVersionCode';
|
||||||
import formatDate from './utils/formatDate';
|
import formatDate from './utils/formatDate';
|
||||||
import { formatPlayerURL } from './utils/twstats';
|
import { formatPlayerURL } from './utils/twstats';
|
||||||
import { formatTribeURL } from './utils/tribalwars';
|
import { formatTribeURL } from './utils/tribalwars';
|
||||||
|
import { buildPlayerURL } from './utils/twhelp';
|
||||||
import { setItem, getItem } from './utils/localStorage';
|
import { setItem, getItem } from './utils/localStorage';
|
||||||
|
|
||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
|
@ -24,9 +26,9 @@ import { setItem, getItem } from './utils/localStorage';
|
||||||
// @namespace https://github.com/tribalwarshelp/scripts
|
// @namespace https://github.com/tribalwarshelp/scripts
|
||||||
// @downloadURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/extendedPlayerProfile.js
|
// @downloadURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/extendedPlayerProfile.js
|
||||||
// @updateURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/extendedPlayerProfile.js
|
// @updateURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/extendedPlayerProfile.js
|
||||||
// @version 1.1.5
|
// @version 1.1.6
|
||||||
// @description Extended player profile
|
// @description Extended player profile
|
||||||
// @author Kichiyaki http://dawid-wysokinski.pl/
|
// @author Kichiyaki https://dawid-wysokinski.pl/
|
||||||
// @match *://*/game.php*screen=info_player*
|
// @match *://*/game.php*screen=info_player*
|
||||||
// @grant none
|
// @grant none
|
||||||
// @run-at document-end
|
// @run-at document-end
|
||||||
|
@ -661,6 +663,15 @@ const wrapAction = (action) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const renderActions = () => {
|
const renderActions = () => {
|
||||||
|
const linkToTWHelp = document.createElement('a');
|
||||||
|
linkToTWHelp.href = buildPlayerURL(
|
||||||
|
getServerVersionCode(SERVER),
|
||||||
|
SERVER,
|
||||||
|
PLAYER_ID
|
||||||
|
);
|
||||||
|
linkToTWHelp.innerHTML = translations.action.linkToTWHelp;
|
||||||
|
actionContainer.appendChild(wrapAction(linkToTWHelp));
|
||||||
|
|
||||||
const showTribeChanges = document.createElement('a');
|
const showTribeChanges = document.createElement('a');
|
||||||
showTribeChanges.href = '#';
|
showTribeChanges.href = '#';
|
||||||
setPage(showTribeChanges, '1');
|
setPage(showTribeChanges, '1');
|
||||||
|
|
|
@ -16,7 +16,9 @@ import getIDFromURL from './utils/getIDFromURL';
|
||||||
import getCurrentServer from './utils/getCurrentServer';
|
import getCurrentServer from './utils/getCurrentServer';
|
||||||
import { setItem, getItem } from './utils/localStorage';
|
import { setItem, getItem } from './utils/localStorage';
|
||||||
import formatDate from './utils/formatDate';
|
import formatDate from './utils/formatDate';
|
||||||
|
import getServerVersionCode from './utils/getServerVersionCode';
|
||||||
import { formatPlayerURL } from './utils/twstats';
|
import { formatPlayerURL } from './utils/twstats';
|
||||||
|
import { buildPlayerURL, buildTribeURL } from './utils/twhelp';
|
||||||
import { formatPlayerURL as formatPlayerURLTribalWars } from './utils/tribalwars';
|
import { formatPlayerURL as formatPlayerURLTribalWars } from './utils/tribalwars';
|
||||||
|
|
||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
|
@ -24,15 +26,16 @@ import { formatPlayerURL as formatPlayerURLTribalWars } from './utils/tribalwars
|
||||||
// @namespace https://github.com/tribalwarshelp/scripts
|
// @namespace https://github.com/tribalwarshelp/scripts
|
||||||
// @updateURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/extendedTribeProfile.js
|
// @updateURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/extendedTribeProfile.js
|
||||||
// @downloadURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/extendedTribeProfile.js
|
// @downloadURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/extendedTribeProfile.js
|
||||||
// @version 1.0.9
|
// @version 1.1.0
|
||||||
// @description Extended tribe profile
|
// @description Extended tribe profile
|
||||||
// @author Kichiyaki http://dawid-wysokinski.pl/
|
// @author Kichiyaki https://dawid-wysokinski.pl/
|
||||||
// @match *://*/game.php*screen=info_ally*
|
// @match *://*/game.php*screen=info_ally*
|
||||||
// @grant none
|
// @grant none
|
||||||
// @run-at document-end
|
// @run-at document-end
|
||||||
// ==/UserScript==
|
// ==/UserScript==
|
||||||
|
|
||||||
const SERVER = getCurrentServer();
|
const SERVER = getCurrentServer();
|
||||||
|
const VERSION = getServerVersionCode(SERVER);
|
||||||
const TRIBE_ID = getIDFromURL(window.location.search);
|
const TRIBE_ID = getIDFromURL(window.location.search);
|
||||||
const LOCAL_STORAGE_KEY = 'kichiyaki_extended_tribe_profile' + TRIBE_ID;
|
const LOCAL_STORAGE_KEY = 'kichiyaki_extended_tribe_profile' + TRIBE_ID;
|
||||||
const TRIBE_QUERY = `
|
const TRIBE_QUERY = `
|
||||||
|
@ -196,7 +199,7 @@ const TRIBE_CHANGES_PER_PAGE = 15;
|
||||||
const profileInfoTBody = document.querySelector(
|
const profileInfoTBody = document.querySelector(
|
||||||
'#content_value > table:nth-child(3) > tbody > tr > td:nth-child(1) > table > tbody'
|
'#content_value > table:nth-child(3) > tbody > tr > td:nth-child(1) > table > tbody'
|
||||||
);
|
);
|
||||||
const actionsContainer = profileInfoTBody;
|
const actionContainer = profileInfoTBody;
|
||||||
const otherElementsContainer = document.querySelector(
|
const otherElementsContainer = document.querySelector(
|
||||||
'#content_value > table:nth-child(3) > tbody > tr > td:nth-child(2)'
|
'#content_value > table:nth-child(3) > tbody > tr > td:nth-child(2)'
|
||||||
);
|
);
|
||||||
|
@ -300,7 +303,10 @@ const extendMembersData = (players) => {
|
||||||
[player.scoreSup, player.rankSup],
|
[player.scoreSup, player.rankSup],
|
||||||
[player.scoreTotal, player.rankTotal],
|
[player.scoreTotal, player.rankTotal],
|
||||||
player.dailyGrowth,
|
player.dailyGrowth,
|
||||||
[formatPlayerURL(SERVER, player.id), 'TWStats'],
|
[
|
||||||
|
{ link: buildPlayerURL(VERSION, SERVER, player.id), label: 'TWHelp' },
|
||||||
|
{ link: formatPlayerURL(SERVER, player.id), label: 'TWStats' },
|
||||||
|
],
|
||||||
].forEach((data, index) => {
|
].forEach((data, index) => {
|
||||||
let td = tr.children[5 + index];
|
let td = tr.children[5 + index];
|
||||||
if (!td) {
|
if (!td) {
|
||||||
|
@ -312,8 +318,13 @@ const extendMembersData = (players) => {
|
||||||
td.innerHTML = `${data[0].toLocaleString()} (<strong>${
|
td.innerHTML = `${data[0].toLocaleString()} (<strong>${
|
||||||
data[1]
|
data[1]
|
||||||
}</strong>)`;
|
}</strong>)`;
|
||||||
} else if (isURL(data[0])) {
|
} else if (data[0].link) {
|
||||||
td.innerHTML = `<a target="_blank" rel="noopener noreferrer" href="${data[0]}">${data[1]}</a>`;
|
td.innerHTML = data
|
||||||
|
.map(
|
||||||
|
({ link, label }) =>
|
||||||
|
`<a target="_blank" rel="noopener noreferrer" href="${link}">${label}</a>`
|
||||||
|
)
|
||||||
|
.join('<br>');
|
||||||
}
|
}
|
||||||
} else if (typeof data === 'number') {
|
} else if (typeof data === 'number') {
|
||||||
td.innerHTML = data.toLocaleString();
|
td.innerHTML = data.toLocaleString();
|
||||||
|
@ -839,44 +850,49 @@ const wrapAction = (action) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const renderActions = () => {
|
const renderActions = () => {
|
||||||
|
const linkToTWHelp = document.createElement('a');
|
||||||
|
linkToTWHelp.href = buildTribeURL(VERSION, SERVER, TRIBE_ID);
|
||||||
|
linkToTWHelp.innerHTML = translations.action.linkToTWHelp;
|
||||||
|
actionContainer.appendChild(wrapAction(linkToTWHelp));
|
||||||
|
|
||||||
const showEnnoblements = document.createElement('a');
|
const showEnnoblements = document.createElement('a');
|
||||||
showEnnoblements.href = '#';
|
showEnnoblements.href = '#';
|
||||||
setPage(showEnnoblements, '1');
|
setPage(showEnnoblements, '1');
|
||||||
showEnnoblements.innerHTML = translations.action.showEnnoblements;
|
showEnnoblements.innerHTML = translations.action.showEnnoblements;
|
||||||
showEnnoblements.addEventListener('click', handleShowTribeEnnoblementsClick);
|
showEnnoblements.addEventListener('click', handleShowTribeEnnoblementsClick);
|
||||||
actionsContainer.appendChild(wrapAction(showEnnoblements));
|
actionContainer.appendChild(wrapAction(showEnnoblements));
|
||||||
|
|
||||||
const showHistory = document.createElement('a');
|
const showHistory = document.createElement('a');
|
||||||
showHistory.href = '#';
|
showHistory.href = '#';
|
||||||
setPage(showHistory, '1');
|
setPage(showHistory, '1');
|
||||||
showHistory.innerHTML = translations.action.showHistory;
|
showHistory.innerHTML = translations.action.showHistory;
|
||||||
showHistory.addEventListener('click', handleShowTribeHistoryClick);
|
showHistory.addEventListener('click', handleShowTribeHistoryClick);
|
||||||
actionsContainer.appendChild(wrapAction(showHistory));
|
actionContainer.appendChild(wrapAction(showHistory));
|
||||||
|
|
||||||
const showTribeChanges = document.createElement('a');
|
const showTribeChanges = document.createElement('a');
|
||||||
showTribeChanges.href = '#';
|
showTribeChanges.href = '#';
|
||||||
setPage(showTribeChanges, '1');
|
setPage(showTribeChanges, '1');
|
||||||
showTribeChanges.innerHTML = translations.action.showTribeChanges;
|
showTribeChanges.innerHTML = translations.action.showTribeChanges;
|
||||||
showTribeChanges.addEventListener('click', handleShowTribeChangesClick);
|
showTribeChanges.addEventListener('click', handleShowTribeChangesClick);
|
||||||
actionsContainer.appendChild(wrapAction(showTribeChanges));
|
actionContainer.appendChild(wrapAction(showTribeChanges));
|
||||||
|
|
||||||
const showMembersGrowth = document.createElement('a');
|
const showMembersGrowth = document.createElement('a');
|
||||||
showMembersGrowth.href = '#';
|
showMembersGrowth.href = '#';
|
||||||
showMembersGrowth.innerHTML = translations.action.showMembersGrowth;
|
showMembersGrowth.innerHTML = translations.action.showMembersGrowth;
|
||||||
showMembersGrowth.addEventListener('click', handleShowMembersGrowthClick);
|
showMembersGrowth.addEventListener('click', handleShowMembersGrowthClick);
|
||||||
actionsContainer.appendChild(wrapAction(showMembersGrowth));
|
actionContainer.appendChild(wrapAction(showMembersGrowth));
|
||||||
|
|
||||||
const generateMailingList = document.createElement('a');
|
const generateMailingList = document.createElement('a');
|
||||||
generateMailingList.href = '#';
|
generateMailingList.href = '#';
|
||||||
generateMailingList.innerHTML = translations.action.generateMailingList;
|
generateMailingList.innerHTML = translations.action.generateMailingList;
|
||||||
generateMailingList.addEventListener('click', handleGenerateMailingListClick);
|
generateMailingList.addEventListener('click', handleGenerateMailingListClick);
|
||||||
actionsContainer.appendChild(wrapAction(generateMailingList));
|
actionContainer.appendChild(wrapAction(generateMailingList));
|
||||||
|
|
||||||
const exportVillages = document.createElement('a');
|
const exportVillages = document.createElement('a');
|
||||||
exportVillages.href = '#';
|
exportVillages.href = '#';
|
||||||
exportVillages.innerHTML = translations.action.exportVillages;
|
exportVillages.innerHTML = translations.action.exportVillages;
|
||||||
exportVillages.addEventListener('click', handleExportTribeVillagesClick);
|
exportVillages.addEventListener('click', handleExportTribeVillagesClick);
|
||||||
actionsContainer.appendChild(wrapAction(exportVillages));
|
actionContainer.appendChild(wrapAction(exportVillages));
|
||||||
};
|
};
|
||||||
|
|
||||||
(async function () {
|
(async function () {
|
||||||
|
|
|
@ -8,6 +8,8 @@ import formatDate from './utils/formatDate';
|
||||||
import wait from './utils/wait';
|
import wait from './utils/wait';
|
||||||
import { setItem, getItem } from './utils/localStorage';
|
import { setItem, getItem } from './utils/localStorage';
|
||||||
import countLoyalty from './utils/countLoyalty';
|
import countLoyalty from './utils/countLoyalty';
|
||||||
|
import getServerVersionCode from './utils/getServerVersionCode';
|
||||||
|
import { buildVillageURL } from './utils/twhelp';
|
||||||
import showEnnoblementsPopup from './common/showEnnoblementsPopup';
|
import showEnnoblementsPopup from './common/showEnnoblementsPopup';
|
||||||
|
|
||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
|
@ -15,9 +17,9 @@ import showEnnoblementsPopup from './common/showEnnoblementsPopup';
|
||||||
// @namespace https://github.com/tribalwarshelp/scripts
|
// @namespace https://github.com/tribalwarshelp/scripts
|
||||||
// @updateURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/extendedVillageProfile.js
|
// @updateURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/extendedVillageProfile.js
|
||||||
// @downloadURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/extendedVillageProfile.js
|
// @downloadURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/extendedVillageProfile.js
|
||||||
// @version 0.7.2
|
// @version 0.7.3
|
||||||
// @description Extended village profile
|
// @description Extended village profile
|
||||||
// @author Kichiyaki http://dawid-wysokinski.pl/
|
// @author Kichiyaki https://dawid-wysokinski.pl/
|
||||||
// @match *://*/game.php*screen=info_village*
|
// @match *://*/game.php*screen=info_village*
|
||||||
// @grant none
|
// @grant none
|
||||||
// @run-at document-end
|
// @run-at document-end
|
||||||
|
@ -336,6 +338,15 @@ const wrapAction = (action) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const renderActions = () => {
|
const renderActions = () => {
|
||||||
|
const linkToTWHelp = document.createElement('a');
|
||||||
|
linkToTWHelp.href = buildVillageURL(
|
||||||
|
getServerVersionCode(SERVER),
|
||||||
|
SERVER,
|
||||||
|
VILLAGE_ID
|
||||||
|
);
|
||||||
|
linkToTWHelp.innerHTML = translations.action.linkToTWHelp;
|
||||||
|
actionContainer.appendChild(wrapAction(linkToTWHelp));
|
||||||
|
|
||||||
const showEnnoblementsPopup = document.createElement('a');
|
const showEnnoblementsPopup = document.createElement('a');
|
||||||
showEnnoblementsPopup.href = '#';
|
showEnnoblementsPopup.href = '#';
|
||||||
setPage(showEnnoblementsPopup, '1');
|
setPage(showEnnoblementsPopup, '1');
|
||||||
|
|
|
@ -7,6 +7,8 @@ const translations = {
|
||||||
dotd: 'Obrońca dnia',
|
dotd: 'Obrońca dnia',
|
||||||
sotd: 'Pomocnik dnia',
|
sotd: 'Pomocnik dnia',
|
||||||
gpotd: 'Mocarstwo dnia',
|
gpotd: 'Mocarstwo dnia',
|
||||||
|
devNote:
|
||||||
|
'Informacja od autora - Właśnie uruchomiłem nową stronę ze statystykami, nie zapomnij jej sprawdzić :).',
|
||||||
},
|
},
|
||||||
en_DK: {
|
en_DK: {
|
||||||
title: 'Daily achievements - probable players',
|
title: 'Daily achievements - probable players',
|
||||||
|
@ -15,6 +17,7 @@ const translations = {
|
||||||
dotd: 'Defender of the day',
|
dotd: 'Defender of the day',
|
||||||
sotd: 'Supporter of the day',
|
sotd: 'Supporter of the day',
|
||||||
gpotd: 'Great power of the day',
|
gpotd: 'Great power of the day',
|
||||||
|
devNote: `Information from the author - I've just launched a new stat tracking website, don't forget to check it out :).`,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,8 @@ const translations = {
|
||||||
exportedVillages: 'Wyeksportowane wioski',
|
exportedVillages: 'Wyeksportowane wioski',
|
||||||
tribeChanges: 'Zmiany plemion',
|
tribeChanges: 'Zmiany plemion',
|
||||||
action: {
|
action: {
|
||||||
|
linkToTWHelp:
|
||||||
|
'Akta gracza - TWHelp - nowa strona ze statystykami i narzędziami',
|
||||||
showTribeChanges: 'Pokaż zmiany plemion',
|
showTribeChanges: 'Pokaż zmiany plemion',
|
||||||
showEnnoblements: 'Pokaż przejęcia',
|
showEnnoblements: 'Pokaż przejęcia',
|
||||||
exportVillages: 'Wyeksportuj wioski',
|
exportVillages: 'Wyeksportuj wioski',
|
||||||
|
@ -30,6 +32,7 @@ const translations = {
|
||||||
},
|
},
|
||||||
en_DK: {
|
en_DK: {
|
||||||
date: 'Date',
|
date: 'Date',
|
||||||
|
|
||||||
newTribe: 'New tribe',
|
newTribe: 'New tribe',
|
||||||
oldTribe: 'Old tribe',
|
oldTribe: 'Old tribe',
|
||||||
joinedAt: 'Joined at',
|
joinedAt: 'Joined at',
|
||||||
|
@ -51,6 +54,8 @@ const translations = {
|
||||||
exportedVillages: 'Exported villages',
|
exportedVillages: 'Exported villages',
|
||||||
tribeChanges: 'Tribe changes',
|
tribeChanges: 'Tribe changes',
|
||||||
action: {
|
action: {
|
||||||
|
linkToTWHelp:
|
||||||
|
'User file (external link) - TWHelp - A new stat tracking website.',
|
||||||
showTribeChanges: 'Show tribe changes',
|
showTribeChanges: 'Show tribe changes',
|
||||||
showEnnoblements: 'Show ennoblements',
|
showEnnoblements: 'Show ennoblements',
|
||||||
exportVillages: 'Export villages',
|
exportVillages: 'Export villages',
|
||||||
|
|
|
@ -27,6 +27,8 @@ const translations = {
|
||||||
dailyGrowth: 'Dzienny przyrost',
|
dailyGrowth: 'Dzienny przyrost',
|
||||||
playerLinks: 'Linki',
|
playerLinks: 'Linki',
|
||||||
action: {
|
action: {
|
||||||
|
linkToTWHelp:
|
||||||
|
'Akta plemienia - TWHelp - nowa strona ze statystykami i narzędziami',
|
||||||
showTribeChanges: 'Pokaż zmiany plemion',
|
showTribeChanges: 'Pokaż zmiany plemion',
|
||||||
showEnnoblements: 'Pokaż przejęcia',
|
showEnnoblements: 'Pokaż przejęcia',
|
||||||
showMembersGrowth: 'Pokaż rozwój graczy',
|
showMembersGrowth: 'Pokaż rozwój graczy',
|
||||||
|
@ -63,6 +65,8 @@ const translations = {
|
||||||
dailyGrowth: 'Daily growth',
|
dailyGrowth: 'Daily growth',
|
||||||
playerLinks: 'Player links',
|
playerLinks: 'Player links',
|
||||||
action: {
|
action: {
|
||||||
|
linkToTWHelp:
|
||||||
|
'Tribal file (external link) - TWHelp - A new stat tracking website.',
|
||||||
showTribeChanges: 'Show tribe changes',
|
showTribeChanges: 'Show tribe changes',
|
||||||
showEnnoblements: 'Show ennoblements',
|
showEnnoblements: 'Show ennoblements',
|
||||||
showMembersGrowth: 'Show members growth',
|
showMembersGrowth: 'Show members growth',
|
||||||
|
|
|
@ -9,6 +9,8 @@ const translations = {
|
||||||
ennobledAt: 'Podbita o',
|
ennobledAt: 'Podbita o',
|
||||||
never: 'Nigdy',
|
never: 'Nigdy',
|
||||||
action: {
|
action: {
|
||||||
|
linkToTWHelp:
|
||||||
|
'Akta wioski - TWHelp - nowa strona ze statystykami i narzędziami',
|
||||||
showEnnoblements: 'Pokaż przejęcia',
|
showEnnoblements: 'Pokaż przejęcia',
|
||||||
countIncomingSupport: 'Policz nadchodzące wsparcie',
|
countIncomingSupport: 'Policz nadchodzące wsparcie',
|
||||||
},
|
},
|
||||||
|
@ -23,6 +25,8 @@ const translations = {
|
||||||
never: 'Never',
|
never: 'Never',
|
||||||
ennobledAt: 'Ennobled at',
|
ennobledAt: 'Ennobled at',
|
||||||
action: {
|
action: {
|
||||||
|
linkToTWHelp:
|
||||||
|
'Village file (external link) - TWHelp - A new stat tracking website.',
|
||||||
showEnnoblements: 'Show ennoblements',
|
showEnnoblements: 'Show ennoblements',
|
||||||
countIncomingSupport: 'Count incoming support',
|
countIncomingSupport: 'Count incoming support',
|
||||||
},
|
},
|
||||||
|
|
|
@ -10,6 +10,8 @@ const translations = {
|
||||||
filters: 'Filtry',
|
filters: 'Filtry',
|
||||||
apply: 'Zastosuj',
|
apply: 'Zastosuj',
|
||||||
ennoblements: 'Przejęcia',
|
ennoblements: 'Przejęcia',
|
||||||
|
devNote:
|
||||||
|
'Informacja od autora - Właśnie uruchomiłem nową stronę ze statystykami, nie zapomnij jej sprawdzić :).',
|
||||||
},
|
},
|
||||||
en_DK: {
|
en_DK: {
|
||||||
showLatestEnnoblements: 'Show latest ennoblements',
|
showLatestEnnoblements: 'Show latest ennoblements',
|
||||||
|
@ -22,6 +24,7 @@ const translations = {
|
||||||
date: 'Date',
|
date: 'Date',
|
||||||
apply: 'Apply',
|
apply: 'Apply',
|
||||||
ennoblements: 'Ennoblements',
|
ennoblements: 'Ennoblements',
|
||||||
|
devNote: `Information from the author - I've just launched a new stat tracking website, don't forget to check it out :).`,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,8 @@ const translations = {
|
||||||
warStatsGenerator: 'Generator statystyk wojennych',
|
warStatsGenerator: 'Generator statystyk wojennych',
|
||||||
generateWarStats: 'Wygeneruj statystyki wojenne',
|
generateWarStats: 'Wygeneruj statystyki wojenne',
|
||||||
addTribe: 'Dodaj plemię',
|
addTribe: 'Dodaj plemię',
|
||||||
|
devNote:
|
||||||
|
'Informacja od autora - Właśnie uruchomiłem nową stronę ze statystykami, nie zapomnij jej sprawdzić :).',
|
||||||
},
|
},
|
||||||
en_DK: {
|
en_DK: {
|
||||||
conquers: 'Conquers',
|
conquers: 'Conquers',
|
||||||
|
@ -28,6 +30,7 @@ const translations = {
|
||||||
warStatsGenerator: 'War stats generator',
|
warStatsGenerator: 'War stats generator',
|
||||||
generateWarStats: 'Generate war stats',
|
generateWarStats: 'Generate war stats',
|
||||||
addTribe: 'Add tribe',
|
addTribe: 'Add tribe',
|
||||||
|
devNote: `Information from the author - I've just launched a new stat tracking website, don't forget to check it out :).`,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -7,9 +7,9 @@ import wait from './utils/wait';
|
||||||
// @namespace https://github.com/tribalwarshelp/scripts
|
// @namespace https://github.com/tribalwarshelp/scripts
|
||||||
// @updateURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/inADayTribeRankingGenerator.js
|
// @updateURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/inADayTribeRankingGenerator.js
|
||||||
// @downloadURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/inADayTribeRankingGenerator.js
|
// @downloadURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/inADayTribeRankingGenerator.js
|
||||||
// @version 0.2.0
|
// @version 0.2.1
|
||||||
// @description 'In A Day' tribe ranking generator
|
// @description 'In A Day' tribe ranking generator
|
||||||
// @author Kichiyaki http://dawid-wysokinski.pl/
|
// @author Kichiyaki https://dawid-wysokinski.pl/
|
||||||
// @match *://*/game.php*screen=ranking*mode=in_a_day*
|
// @match *://*/game.php*screen=ranking*mode=in_a_day*
|
||||||
// @grant none
|
// @grant none
|
||||||
// @run-at document-end
|
// @run-at document-end
|
||||||
|
|
|
@ -9,6 +9,8 @@ import {
|
||||||
formatVillageName,
|
formatVillageName,
|
||||||
} from './utils/tribalwars';
|
} from './utils/tribalwars';
|
||||||
import { setItem, getItem } from './utils/localStorage';
|
import { setItem, getItem } from './utils/localStorage';
|
||||||
|
import { buildURLToServerPage } from './utils/twhelp';
|
||||||
|
import getServerVersionCode from './utils/getServerVersionCode';
|
||||||
import loadTranslations from './i18n/latestEnnoblements';
|
import loadTranslations from './i18n/latestEnnoblements';
|
||||||
|
|
||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
|
@ -16,9 +18,9 @@ import loadTranslations from './i18n/latestEnnoblements';
|
||||||
// @namespace https://github.com/tribalwarshelp/scripts
|
// @namespace https://github.com/tribalwarshelp/scripts
|
||||||
// @updateURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/latestEnnoblements.js
|
// @updateURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/latestEnnoblements.js
|
||||||
// @downloadURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/latestEnnoblements.js
|
// @downloadURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/latestEnnoblements.js
|
||||||
// @version 1.0.5
|
// @version 1.0.6
|
||||||
// @description Show the latest ennoblements
|
// @description Show the latest ennoblements
|
||||||
// @author Kichiyaki http://dawid-wysokinski.pl/
|
// @author Kichiyaki https://dawid-wysokinski.pl/
|
||||||
// @match *://*/game.php*
|
// @match *://*/game.php*
|
||||||
// @grant none
|
// @grant none
|
||||||
// @run-at document-end
|
// @run-at document-end
|
||||||
|
@ -200,6 +202,13 @@ const renderLatestEnnoblements = (ennoblements = [], filters = {}) => {
|
||||||
};
|
};
|
||||||
const html = `
|
const html = `
|
||||||
<form style="margin-bottom: 15px" id="${FILTER_FORM_ID}">
|
<form style="margin-bottom: 15px" id="${FILTER_FORM_ID}">
|
||||||
|
<h1 style="margin-bottom: 0px; text-align: center;"><a href="${buildURLToServerPage(
|
||||||
|
getServerVersionCode(SERVER),
|
||||||
|
SERVER
|
||||||
|
)}">TWHelp</a></h1>
|
||||||
|
<h3 style="margin-bottom: 10px; margin-top: 0;">${
|
||||||
|
translations.devNote
|
||||||
|
}</h3>
|
||||||
<h3 style="margin-bottom: 5px">${translations.filters}</h3>
|
<h3 style="margin-bottom: 5px">${translations.filters}</h3>
|
||||||
<input type="text" placeholder="${translations.newOwner}" value="${
|
<input type="text" placeholder="${translations.newOwner}" value="${
|
||||||
prepared.newOwner
|
prepared.newOwner
|
||||||
|
|
26
src/utils/twhelp.js
Normal file
26
src/utils/twhelp.js
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
export const BASE_URL = 'tribalwarshelp.com';
|
||||||
|
|
||||||
|
export const buildURLToServerPage = (version = '', server = '') => {
|
||||||
|
return `https://${version}.${BASE_URL}/server/${server}`;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const buildURLToProfile = (
|
||||||
|
version = '',
|
||||||
|
server = '',
|
||||||
|
id = 0,
|
||||||
|
entity = ''
|
||||||
|
) => {
|
||||||
|
return `${buildURLToServerPage(version, server)}/${entity}/${id}`;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const buildPlayerURL = (version = '', server = '', id = 0) => {
|
||||||
|
return buildURLToProfile(version, server, id, 'player');
|
||||||
|
};
|
||||||
|
|
||||||
|
export const buildTribeURL = (version = '', server = '', id = 0) => {
|
||||||
|
return buildURLToProfile(version, server, id, 'tribe');
|
||||||
|
};
|
||||||
|
|
||||||
|
export const buildVillageURL = (version = '', server = '', id = 0) => {
|
||||||
|
return buildURLToProfile(version, server, id, 'village');
|
||||||
|
};
|
|
@ -1,6 +1,8 @@
|
||||||
import requestCreator from './libs/requestCreator';
|
import requestCreator from './libs/requestCreator';
|
||||||
import getTranslations from './i18n/warStatsGenerator';
|
import getTranslations from './i18n/warStatsGenerator';
|
||||||
import getServer from './utils/getCurrentServer';
|
import getServer from './utils/getCurrentServer';
|
||||||
|
import getServerVersionCode from './utils/getServerVersionCode';
|
||||||
|
import { buildURLToServerPage } from './utils/twhelp';
|
||||||
import showPopup, { POPUP_SELECTOR } from './utils/showPopup';
|
import showPopup, { POPUP_SELECTOR } from './utils/showPopup';
|
||||||
|
|
||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
|
@ -8,9 +10,9 @@ import showPopup, { POPUP_SELECTOR } from './utils/showPopup';
|
||||||
// @namespace https://github.com/tribalwarshelp/scripts
|
// @namespace https://github.com/tribalwarshelp/scripts
|
||||||
// @updateURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/warStatsGenerator.js
|
// @updateURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/warStatsGenerator.js
|
||||||
// @downloadURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/warStatsGenerator.js
|
// @downloadURL https://raw.githubusercontent.com/tribalwarshelp/scripts/master/dist/warStatsGenerator.js
|
||||||
// @version 0.3.0
|
// @version 0.3.1
|
||||||
// @description War stats generator
|
// @description War stats generator
|
||||||
// @author Kichiyaki http://dawid-wysokinski.pl/
|
// @author Kichiyaki https://dawid-wysokinski.pl/
|
||||||
// @match *://*/game.php*screen=ranking*mode=wars*
|
// @match *://*/game.php*screen=ranking*mode=wars*
|
||||||
// @grant none
|
// @grant none
|
||||||
// @run-at document-end
|
// @run-at document-end
|
||||||
|
@ -180,6 +182,13 @@ const handleFormSubmit = async (e) => {
|
||||||
const showWarStatsForm = (e) => {
|
const showWarStatsForm = (e) => {
|
||||||
const html = `
|
const html = `
|
||||||
<form>
|
<form>
|
||||||
|
<h1 style="margin-bottom: 0px; text-align: center;"><a href="${buildURLToServerPage(
|
||||||
|
getServerVersionCode(SERVER),
|
||||||
|
SERVER
|
||||||
|
)}">TWHelp</a></h1>
|
||||||
|
<h3 style="margin-bottom: 10px; margin-top: 0;">${
|
||||||
|
translations.devNote
|
||||||
|
}</h3>
|
||||||
<div id="${RESULT_CONTAINER_ID}">
|
<div id="${RESULT_CONTAINER_ID}">
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-bottom: 10px;">
|
<div style="margin-bottom: 10px;">
|
||||||
|
@ -199,18 +208,24 @@ const showWarStatsForm = (e) => {
|
||||||
<h3>${translations.sideOne}</h3>
|
<h3>${translations.sideOne}</h3>
|
||||||
<div id="${SIDE_ONE_INPUT_CONTAINER_ID}">
|
<div id="${SIDE_ONE_INPUT_CONTAINER_ID}">
|
||||||
</div>
|
</div>
|
||||||
<button id="${SIDE_ONE_BUTTON_ID}" class="btn" type="button">${translations.addTribe}</button>
|
<button id="${SIDE_ONE_BUTTON_ID}" class="btn" type="button">${
|
||||||
|
translations.addTribe
|
||||||
|
}</button>
|
||||||
</div>
|
</div>
|
||||||
<div style="margin: 0 5px;"></div>
|
<div style="margin: 0 5px;"></div>
|
||||||
<div>
|
<div>
|
||||||
<h3>${translations.sideTwo}</h3>
|
<h3>${translations.sideTwo}</h3>
|
||||||
<div id="${SIDE_TWO_INPUT_CONTAINER_ID}">
|
<div id="${SIDE_TWO_INPUT_CONTAINER_ID}">
|
||||||
</div>
|
</div>
|
||||||
<button id="${SIDE_TWO_BUTTON_ID}" class="btn" type="button">${translations.addTribe}</button>
|
<button id="${SIDE_TWO_BUTTON_ID}" class="btn" type="button">${
|
||||||
|
translations.addTribe
|
||||||
|
}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="text-align: center;">
|
<div style="text-align: center;">
|
||||||
<button class="btn" type="submit">${translations.generateWarStats}</button>
|
<button class="btn" type="submit">${
|
||||||
|
translations.generateWarStats
|
||||||
|
}</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
`;
|
`;
|
||||||
|
|
Reference in New Issue
Block a user