fix: extendedTribeProfile - update the membersContainer selector
This commit is contained in:
parent
8ed1907e41
commit
c648064ebc
|
@ -1365,7 +1365,7 @@ 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.1.3
|
// @version 1.1.4
|
||||||
// @description Extended tribe profile
|
// @description Extended tribe profile
|
||||||
// @author Kichiyaki https://dwysokinski.me/
|
// @author Kichiyaki https://dwysokinski.me/
|
||||||
// @match *://*/game.php*screen=info_ally*
|
// @match *://*/game.php*screen=info_ally*
|
||||||
|
@ -1389,7 +1389,7 @@ 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 actionContainer = 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 h3').nextElementSibling.querySelector('tbody');
|
||||||
const translations = (0, _extendedTribeProfile.default)();
|
const translations = (0, _extendedTribeProfile.default)();
|
||||||
|
|
||||||
const loadDataFromCache = () => {
|
const loadDataFromCache = () => {
|
||||||
|
@ -1946,9 +1946,10 @@ const renderActions = () => {
|
||||||
actionContainer.appendChild(wrapAction(exportVillages));
|
actionContainer.appendChild(wrapAction(exportVillages));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const fixTribeMembersTableWidth = () => {};
|
||||||
|
|
||||||
(async function () {
|
(async function () {
|
||||||
try {
|
try {
|
||||||
document.querySelector('#content_value > table:nth-child(3)').style.width = '100%';
|
|
||||||
renderActions();
|
renderActions();
|
||||||
const dataFromCache = loadDataFromCache();
|
const dataFromCache = loadDataFromCache();
|
||||||
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -25,7 +25,7 @@ import * as twutils 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.1.3
|
// @version 1.1.4
|
||||||
// @description Extended tribe profile
|
// @description Extended tribe profile
|
||||||
// @author Kichiyaki https://dwysokinski.me/
|
// @author Kichiyaki https://dwysokinski.me/
|
||||||
// @match *://*/game.php*screen=info_ally*
|
// @match *://*/game.php*screen=info_ally*
|
||||||
|
@ -202,9 +202,9 @@ 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)'
|
||||||
);
|
);
|
||||||
const membersContainer = document.querySelector(
|
const membersContainer = document
|
||||||
'#content_value > table.vis > tbody'
|
.querySelector('#content_value h3')
|
||||||
);
|
.nextElementSibling.querySelector('tbody');
|
||||||
const translations = getTranslations();
|
const translations = getTranslations();
|
||||||
|
|
||||||
const loadDataFromCache = () => {
|
const loadDataFromCache = () => {
|
||||||
|
@ -898,11 +898,10 @@ const renderActions = () => {
|
||||||
actionContainer.appendChild(wrapAction(exportVillages));
|
actionContainer.appendChild(wrapAction(exportVillages));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const fixTribeMembersTableWidth = () => {};
|
||||||
|
|
||||||
(async function () {
|
(async function () {
|
||||||
try {
|
try {
|
||||||
document.querySelector('#content_value > table:nth-child(3)').style.width =
|
|
||||||
'100%';
|
|
||||||
|
|
||||||
renderActions();
|
renderActions();
|
||||||
|
|
||||||
const dataFromCache = loadDataFromCache();
|
const dataFromCache = loadDataFromCache();
|
||||||
|
|
Reference in New Issue