diff --git a/.babelrc b/.babelrc index 7e241e236..bc045ca84 100644 --- a/.babelrc +++ b/.babelrc @@ -29,7 +29,9 @@ // ES3 "@babel/plugin-transform-member-expression-literals", - "@babel/plugin-transform-property-literals" + "@babel/plugin-transform-property-literals", + + "@babel/plugin-transform-strict-mode" ], "ignore": [ "src/globals.d.ts" diff --git a/.editorconfig b/.editorconfig index b42aef9cc..de0730e27 100644 --- a/.editorconfig +++ b/.editorconfig @@ -25,3 +25,6 @@ trim_trailing_whitespace = false indent_style = tab indent_size = 8 trim_trailing_whitespace = false + +[COMMIT_EDITMSG] +indent_style = space diff --git a/eslint-ps-standard.mjs b/eslint-ps-standard.mjs index 038b29472..6041a6974 100644 --- a/eslint-ps-standard.mjs +++ b/eslint-ps-standard.mjs @@ -174,6 +174,7 @@ export const defaultRules = { "@stylistic/jsx-one-expression-per-line": "off", "@stylistic/jsx-max-props-per-line": "off", "@stylistic/jsx-function-call-newline": "off", + "@stylistic/jsx-child-element-spacing": "error", "no-restricted-syntax": ["error", { selector: "CallExpression[callee.name='Symbol']", message: "Annoying to serialize, just use a string" }, ], diff --git a/package-lock.json b/package-lock.json index 84bf6d032..9e1c2316b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,6 +11,7 @@ "dependencies": { "@babel/core": "^7.26.10", "@babel/plugin-transform-react-jsx": "^7.25.9", + "@babel/plugin-transform-strict-mode": "^7.25.9", "@babel/preset-env": "^7.26.9", "@babel/preset-typescript": "^7.27.0", "babel-plugin-remove-import-export": "^1.1.1", @@ -1264,6 +1265,21 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-transform-strict-mode": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-strict-mode/-/plugin-transform-strict-mode-7.25.9.tgz", + "integrity": "sha512-DplEwkN9xt6XCz/4oC9l8FJGn7LnOGPU7v08plq+OclMT55zAR9lkX7QIbQ9XscvvJNYpLUfYO4IYz/7JGkbXQ==", + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/plugin-transform-template-literals": { "version": "7.26.8", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.26.8.tgz", diff --git a/package.json b/package.json index ac1e49134..6f0423407 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "dependencies": { "@babel/core": "^7.26.10", "@babel/plugin-transform-react-jsx": "^7.25.9", + "@babel/plugin-transform-strict-mode": "^7.25.9", "@babel/preset-env": "^7.26.9", "@babel/preset-typescript": "^7.27.0", "babel-plugin-remove-import-export": "^1.1.1", diff --git a/play.pokemonshowdown.com/js/client-chat-tournament.js b/play.pokemonshowdown.com/js/client-chat-tournament.js index 665cfc818..d5f0b1879 100644 --- a/play.pokemonshowdown.com/js/client-chat-tournament.js +++ b/play.pokemonshowdown.com/js/client-chat-tournament.js @@ -612,8 +612,8 @@ TournamentBox.nodeSize = { width: 160, height: 30, radius: 5, - separationX: 20, separationY: 20, - textOffset: -1 + separationX: 20, separationY: 10, + textOffset: 4 }; TournamentBox.prototype.generateBracket = function (data, abbreviated) { @@ -655,9 +655,15 @@ child.highlightLink = true; } } - } else if (node.state === 'inprogress' || node.state === 'available' || node.state === 'challenging') { + } else if ( + node.state === 'inprogress' || node.state === 'available' || node.state === 'challenging' || + node.state === 'unavailable' + ) { for (var i = 0; i < node.children.length; i++) { - node.children[i].highlightLink = true; + var child = node.children[i]; + if (child.team && !child.team.startsWith('(')) { + child.highlightLink = true; + } } } else if (highlightName) { for (var i = 0; i < node.children.length; i++) { @@ -763,6 +769,7 @@ if (node.team === name) rect.attr('stroke-dasharray', '5,5').attr('stroke-width', 2); elem.append('svg:text').classed('tournament-bracket-tree-node-team', true) + .attr('y', nodeSize.textOffset) .classed('tournament-bracket-tree-node-team-draw', true) .text(node.team || ''); } else { diff --git a/play.pokemonshowdown.com/js/client-endload.js b/play.pokemonshowdown.com/js/client-endload.js new file mode 100644 index 000000000..5df4649cd --- /dev/null +++ b/play.pokemonshowdown.com/js/client-endload.js @@ -0,0 +1,4 @@ +"use strict"; + +PS.libsLoaded.loaded(); +//# sourceMappingURL=client-endload.js.map \ No newline at end of file diff --git a/play.pokemonshowdown.com/js/client-mainmenu.js b/play.pokemonshowdown.com/js/client-mainmenu.js index 7532efb2b..66ce03f76 100644 --- a/play.pokemonshowdown.com/js/client-mainmenu.js +++ b/play.pokemonshowdown.com/js/client-mainmenu.js @@ -1339,11 +1339,6 @@ bufs[curBuf] += BattleLog.escapeHTML(curSection) + ''; } var formatName = BattleLog.escapeFormat(format.id); - if (formatName.charAt(0) !== '[') formatName = '[Gen 6] ' + formatName; - formatName = formatName.replace('[Gen 9] ', ''); - formatName = formatName.replace('[Gen 9 ', '['); - formatName = formatName.replace('[Gen 8 ', '['); - formatName = formatName.replace('[Gen 7 ', '['); bufs[curBuf] += ( '
'; + return buf + ' draggable="true">' + BattleLog.escapeHTML(room.title.slice(1, closeBracketIndex)) + '' + BattleLog.escapeHTML(room.title.slice(closeBracketIndex + 1)) + '