diff --git a/Plan/common/src/main/java/com/djrapitops/plan/delivery/export/NetworkPageExporter.java b/Plan/common/src/main/java/com/djrapitops/plan/delivery/export/NetworkPageExporter.java index ce9a22565..6279cb09f 100644 --- a/Plan/common/src/main/java/com/djrapitops/plan/delivery/export/NetworkPageExporter.java +++ b/Plan/common/src/main/java/com/djrapitops/plan/delivery/export/NetworkPageExporter.java @@ -95,7 +95,13 @@ public class NetworkPageExporter extends FileExporter { .resolve("index.html"); Page page = pageFactory.networkPage(); - export(to, exportPaths.resolveExportPaths(page.toHtml())); + + // Fixes refreshingJsonRequest ignoring old data of export + String html = StringUtils.replaceEach(page.toHtml(), + new String[]{"loadPlayersOnlineGraph, 'network-overview', true);"}, + new String[]{"loadPlayersOnlineGraph, 'network-overview');"}); + + export(to, exportPaths.resolveExportPaths(html)); } /** diff --git a/Plan/common/src/main/java/com/djrapitops/plan/delivery/export/PlayersPageExporter.java b/Plan/common/src/main/java/com/djrapitops/plan/delivery/export/PlayersPageExporter.java index e35c80306..ab33f4a76 100644 --- a/Plan/common/src/main/java/com/djrapitops/plan/delivery/export/PlayersPageExporter.java +++ b/Plan/common/src/main/java/com/djrapitops/plan/delivery/export/PlayersPageExporter.java @@ -93,7 +93,13 @@ public class PlayersPageExporter extends FileExporter { .resolve("index.html"); Page page = pageFactory.playersPage(); - export(to, exportPaths.resolveExportPaths(page.toHtml())); + + // Fixes refreshingJsonRequest ignoring old data of export + String html = StringUtils.replaceEach(page.toHtml(), + new String[]{"}, 'playerlist', true);"}, + new String[]{"}, 'playerlist');"}); + + export(to, exportPaths.resolveExportPaths(html)); } private void exportJSON(Path toDirectory) throws IOException { diff --git a/Plan/common/src/main/java/com/djrapitops/plan/delivery/export/ServerPageExporter.java b/Plan/common/src/main/java/com/djrapitops/plan/delivery/export/ServerPageExporter.java index 5be76b5f4..92a94014a 100644 --- a/Plan/common/src/main/java/com/djrapitops/plan/delivery/export/ServerPageExporter.java +++ b/Plan/common/src/main/java/com/djrapitops/plan/delivery/export/ServerPageExporter.java @@ -105,7 +105,21 @@ public class ServerPageExporter extends FileExporter { .resolve("index.html"); Page page = pageFactory.serverPage(serverUUID); - export(to, exportPaths.resolveExportPaths(page.toHtml())); + + // Fixes refreshingJsonRequest ignoring old data of export + String html = StringUtils.replaceEach(page.toHtml(), + new String[]{ + "loadOptimizedPerformanceGraph, 'performance', true);", + "loadServerCalendar, 'online-activity-overview', true);", + "}, 'playerlist', true);" + }, + new String[]{ + "loadOptimizedPerformanceGraph, 'performance');", + "loadServerCalendar, 'online-activity-overview');", + "}, 'playerlist');" + }); + + export(to, exportPaths.resolveExportPaths(html)); } /**