Compare commits
No commits in common. "43c46f3a3aa1f33abdf4026f709b1849e21a465b" and "29e6c4f5074361d81e7155d8dd479069fb11088b" have entirely different histories.
43c46f3a3a
...
29e6c4f507
|
|
@ -16,10 +16,8 @@ export default (/** @type {ModUtils} */ { modifyCode, insertCode, replaceCode, r
|
||||||
insertCode(`this.y___ = function() { s___.t(5, 5); };
|
insertCode(`this.y___ = function() { s___.t(5, 5); };
|
||||||
this.a3a = function() { s___.w___(); aY.init(); }; /* here */`,
|
this.a3a = function() { s___.w___(); aY.init(); }; /* here */`,
|
||||||
`__fx.customLobby.setJoinFunction(() => { s___.w___(); aY.init(); });`)
|
`__fx.customLobby.setJoinFunction(() => { s___.w___(); aY.init(); });`)
|
||||||
modifyCode(`var l;
|
replaceCode(`var aRc;if(l.dk){aRc="ws://localhost:"+(7130+a09)+"/";}else{aRc=aRX[0]+az.y.aQ9[a09]+aRX[1+l.dl];}aRW=new WebSocket(aRc)`,
|
||||||
${insert(`if (__fx.customLobby.isActive()) l = __fx.customLobby.getSocketURL();
|
`var aRc;if(l.dk){aRc="ws://localhost:"+(7130+a09)+"/";}else{aRc=aRX[0]+az.y.aQ9[a09]+aRX[1+l.dl];}aRW=new WebSocket(__fx.customLobby.isActive() && a09 === 1 ? __fx.customLobby.getSocketURL() : aRc)`)
|
||||||
else`)} if (b.c) { l = "ws://localhost:" + (7130 + d) + "/"; }`)
|
|
||||||
|
|
||||||
// if the server is unreachable
|
// if the server is unreachable
|
||||||
insertCode(`if (socketId === 0) { q.a08(3249); return; } /* here */`,
|
insertCode(`if (socketId === 0) { q.a08(3249); return; } /* here */`,
|
||||||
`if (socketId === 1 && __fx.customLobby.isActive()) {
|
`if (socketId === 1 && __fx.customLobby.isActive()) {
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,7 @@
|
||||||
import { definePatch, insert } from "../modUtils.js"
|
import { definePatch, insert } from "../modUtils.js"
|
||||||
import { styleText } from "node:util";
|
import { styleText } from "node:util";
|
||||||
|
|
||||||
export default definePatch(({ insertCode, modifyCode, replaceCode }) => {
|
export default definePatch(({ insertCode, modifyCode }) => {
|
||||||
|
|
||||||
// Add FX Client version info to the game version window
|
|
||||||
modifyCode(`4, 1, new g(__L(), b.c + "<br>" + d.e.f("/changelog")
|
|
||||||
${insert(` + "<br><br><b>" + "FX Client v" + __fx.version
|
|
||||||
+ "<br><a href='https://discord.gg/dyxcwdNKwK' target='_blank'>FX Client Discord server</a>"
|
|
||||||
+ "<br><a href='https://github.com/fxclient/FXclient' target='_blank'>Github repository</a></b>"`)} /*...*/)`)
|
|
||||||
|
|
||||||
// Hide propaganda popup
|
// Hide propaganda popup
|
||||||
insertCode(`/* here */
|
insertCode(`/* here */
|
||||||
|
|
@ -20,9 +14,6 @@ export default definePatch(({ insertCode, modifyCode, replaceCode }) => {
|
||||||
return;
|
return;
|
||||||
} ${insert(`if (!__fx.settings.hidePropagandaPopup && !__fx.customLobby.isActive())`)} a.g.h(5);`)
|
} ${insert(`if (!__fx.settings.hidePropagandaPopup && !__fx.customLobby.isActive())`)} a.g.h(5);`)
|
||||||
|
|
||||||
// Invalid hostname detection avoidance
|
|
||||||
replaceCode(`this.hostnameIsValid = a.indexOf("territorial.io") >= 0;`, `this.hostnameIsValid = true;`)
|
|
||||||
|
|
||||||
// for the custom lobby version
|
// for the custom lobby version
|
||||||
try {
|
try {
|
||||||
modifyCode(`new a("⚔️<br>" + __L(), function() {
|
modifyCode(`new a("⚔️<br>" + __L(), function() {
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,12 @@ function applyPatches(/** @type {ModUtils} */ { replace, replaceOne, replaceRawC
|
||||||
replaceOne(/(\(6,"territorial\.io",6,")[^"]+"\),/g, "$1" + assets.fxClientLogo + "\"),");
|
replaceOne(/(\(6,"territorial\.io",6,")[^"]+"\),/g, "$1" + assets.fxClientLogo + "\"),");
|
||||||
replaceOne(/(\(22,"logo",8,")[^"]+"\)/g, "$1" + assets.smallLogo + "\")");
|
replaceOne(/(\(22,"logo",8,")[^"]+"\)/g, "$1" + assets.smallLogo + "\")");
|
||||||
|
|
||||||
|
// Add FX Client version info to the game version window
|
||||||
|
replaceRawCode(`ar.oa(4,1,new s8(__L(),c.gameVersion+"<br><a href='"+ah.aC5+"' target='_blank'>"+ah.aC5+"</a>",`,
|
||||||
|
`ar.oa(4,1,new s8(__L(),c.gameVersion+"<br><a href='"+ah.aC5+"' target='_blank'>"+ah.aC5+"</a>"
|
||||||
|
+ "<br><br><b>" + "FX Client v" + __fx.version + "<br><a href='https://discord.gg/dyxcwdNKwK' target='_blank'>FX Client Discord server</a>"
|
||||||
|
+ "<br><a href='https://github.com/fxclient/FXclient' target='_blank'>Github repository</a></b>",`);
|
||||||
|
|
||||||
// Add update information
|
// Add update information
|
||||||
replaceRawCode(`new k("🚀 New Game Update","The game was updated! Please reload the game.",!0,[`,
|
replaceRawCode(`new k("🚀 New Game Update","The game was updated! Please reload the game.",!0,[`,
|
||||||
`new k("🚀 New Game Update","The game was updated! Please reload the game."
|
`new k("🚀 New Game Update","The game was updated! Please reload the game."
|
||||||
|
|
@ -165,6 +171,10 @@ function applyPatches(/** @type {ModUtils} */ { replace, replaceOne, replaceRawC
|
||||||
`qr = (__fx.settings.detailedTeamPercentage ? (100*f0).toFixed(2) : Math.floor(100*f0+.5)) + "%"`)
|
`qr = (__fx.settings.detailedTeamPercentage ? (100*f0).toFixed(2) : Math.floor(100*f0+.5)) + "%"`)
|
||||||
replaceRawCode(",fontSize=+dz*Math.min(f0,.37);", ",fontSize=(__fx.settings.detailedTeamPercentage ? 0.75 : 1)*dz*Math.min(f0,.37);")
|
replaceRawCode(",fontSize=+dz*Math.min(f0,.37);", ",fontSize=(__fx.settings.detailedTeamPercentage ? 0.75 : 1)*dz*Math.min(f0,.37);")
|
||||||
|
|
||||||
|
// Invalid hostname detection avoidance
|
||||||
|
replaceRawCode(`,this.hostnameIsValid=0<=window.location.hostname.toLowerCase().indexOf("territorial.io"),`,
|
||||||
|
`,this.hostnameIsValid=true,`)
|
||||||
|
|
||||||
console.log('Removing ads...');
|
console.log('Removing ads...');
|
||||||
// Remove ads
|
// Remove ads
|
||||||
replace('//api.adinplay.com/libs/aiptag/pub/TRT/territorial.io/tag.min.js', '');
|
replace('//api.adinplay.com/libs/aiptag/pub/TRT/territorial.io/tag.min.js', '');
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import versionData from '../version.json';
|
import versionData from '../version.json';
|
||||||
const { version, lastUpdated, isSignificant } = versionData;
|
const { version, lastUpdated } = versionData;
|
||||||
|
|
||||||
import settingsManager from './settings.js';
|
import settingsManager from './settings.js';
|
||||||
import { clanFilter, leaderboardFilter } from "./clanFilters.js";
|
import { clanFilter, leaderboardFilter } from "./clanFilters.js";
|
||||||
|
|
@ -22,7 +22,7 @@ __fx.isCustomLobbyVersion = window.location.href.startsWith("https://fxclient.gi
|
||||||
const savedVersion = localStorage.getItem("fx_version");
|
const savedVersion = localStorage.getItem("fx_version");
|
||||||
if (savedVersion !== version && !__fx.isCustomLobbyVersion) {
|
if (savedVersion !== version && !__fx.isCustomLobbyVersion) {
|
||||||
localStorage.setItem("fx_version", version);
|
localStorage.setItem("fx_version", version);
|
||||||
if (savedVersion !== null && isSignificant) displayChangelog();
|
if (savedVersion !== null) displayChangelog();
|
||||||
}
|
}
|
||||||
|
|
||||||
__fx.settingsManager = settingsManager;
|
__fx.settingsManager = settingsManager;
|
||||||
|
|
|
||||||
14
version.json
14
version.json
|
|
@ -1,9 +1,11 @@
|
||||||
{
|
{
|
||||||
"version": "0.6.18.1",
|
"version": "0.6.18",
|
||||||
"lastUpdated": "Jan 25",
|
"lastUpdated": "Dec 30",
|
||||||
"changes": [
|
"changes": [
|
||||||
"Fixes for game update v2.15.3",
|
"Updated custom lobbies to the latest version",
|
||||||
"The \"What's new\" screen is no longer shown automatically after insignificant updates (such as this one)"
|
"When creating a custom lobby, you can now select a region where it will be created",
|
||||||
],
|
"The latency to the custom lobby server is displayed below the header in the custom lobby UI",
|
||||||
"isSignificant": false
|
"Improved the propaganda blocking feature",
|
||||||
|
"Added automatic patches for the special custom lobby version (https://fxclient.github.io/custom-lobbies) which continues to serve its purpose of guaranteeing access to custom lobbies while allowing the regular version to quickly be updated to the latest Territorial.io version, neglecting the custom lobby patches if needed"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue