Add an option to hide the propaganda popup
parent
46d925daa1
commit
0841224a61
|
|
@ -0,0 +1,12 @@
|
|||
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;`)
|
||||
|
||||
})
|
||||
|
|
@ -26,6 +26,7 @@ var settings = {
|
|||
customBackgroundUrl: "",
|
||||
keybindButtons: false,
|
||||
attackPercentageKeybinds: [],
|
||||
hidePropagandaPopup: false
|
||||
};
|
||||
__fx.settings = settings;
|
||||
const discontinuedSettings = ["hideAllLinks", "fontName"];
|
||||
|
|
@ -92,6 +93,11 @@ 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",
|
||||
|
|
@ -189,7 +195,6 @@ 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();
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue