Compare commits

..

No commits in common. "d4d68e752c9e706f71ee46571b5d347bf4c684f7" and "5dfe34c2d0fb20e6e8eac2658aaf46e134d2bfd5" have entirely different histories.

4 changed files with 7 additions and 30 deletions

View File

@ -106,7 +106,6 @@ class ModUtils {
}
return Object.fromEntries(Object.entries(groups).map(([identifier, groupNumber]) => [identifier, expressionMatchResult[groupNumber]]));
}
/** @param {{ [x: string]: string; }} [nameMappings] */
matchRawCode(/** @type {string} */ raw, nameMappings) {
const { expression, groups } = this.generateRegularExpression(raw, false, nameMappings);
try {
@ -149,8 +148,8 @@ class ModUtils {
* @typedef {{ dictionary?: { [x: string]: string } }} BaseOptions
* @typedef {BaseOptions & { addToDictionary?: string[] }} MatchCodeOptions
*/
matchCode(/** @type {string} */ code, /** @type {MatchCodeOptions=} */ options) {
const result = this.matchRawCode(minifyCode(code), options?.dictionary);
matchCode(code, /** @type {MatchCodeOptions=} */ options) {
const result = this.matchRawCode(minifyCode(code));
if (options?.addToDictionary !== undefined) {
options.addToDictionary.forEach(varName => {
if (result[varName] === undefined)
@ -187,8 +186,3 @@ class ModUtils {
}
export default ModUtils;
/** @param {(modUtils: ModUtils) => any} callback */
export function definePatch(callback) {
return (/** @type {ModUtils} */ modUtils) => callback(modUtils)
}

View File

@ -1,12 +0,0 @@
import { definePatch } from "../modUtils.js"
export default definePatch(({ insertCode }) => {
// Hide propaganda popup
insertCode(`/* here */
a = b.c + 60 * 1000;
(new ea()).show(eS.eb, eS.colors, eS.id);
eS = null;
return true;`, `if (__fx.settings.hidePropagandaPopup) return;`)
})

View File

@ -26,7 +26,6 @@ var settings = {
customBackgroundUrl: "",
keybindButtons: false,
attackPercentageKeybinds: [],
hidePropagandaPopup: false
};
__fx.settings = settings;
const discontinuedSettings = ["hideAllLinks", "fontName"];
@ -93,11 +92,6 @@ const settingsManager = new (function () {
label: "Highlight clan spawnpoints",
note: "Increases the spawnpoint glow size for members of your clan",
},
{
for: "hidePropagandaPopup",
type: "checkbox",
label: "Hide propaganda popup"
},
{
for: "detailedTeamPercentage", type: "checkbox",
label: "Detailed team pie chart percentage",
@ -195,6 +189,7 @@ const settingsManager = new (function () {
WindowManager.closeWindow("settings");
discontinuedSettings.forEach((settingName) => delete settings[settingName]);
localStorage.setItem("fx_settings", JSON.stringify(settings));
// should probably firgure out a way to do this without reloading - // You can't do it, localstorages REQUIRE you to reload
window.location.reload();
};

View File

@ -1,7 +1,7 @@
{
"version": "0.6.16",
"lastUpdated": "Nov 3",
"version": "0.6.15.2",
"lastUpdated": "Oct 6",
"changes": [
"Add a settings option for hiding the propaganda popup"
"Fix for game update v2.13.3"
]
}