diff --git a/build/index.php b/build/index.php index d6d0f88..eb90910 100644 --- a/build/index.php +++ b/build/index.php @@ -3710,10 +3710,14 @@ register_module([ $content .= "\n\t\t\n"; + // Content only mode: Sends only the raw rendered page + if(isset($_GET["contentonly"]) and $_GET["contentonly"] === "yes") + exit(parse_page_source($content)); + // Printable: Sends a printable version of the page if(isset($_GET["printable"]) and $_GET["printable"] === "yes") exit(page_renderer::render_minimal($title, $content)); - else - exit(page_renderer::render_main($title, $content)); + // Normal page + exit(page_renderer::render_main($title, $content)); }); } ]); diff --git a/module_index.json b/module_index.json index 8e83b6f..fea1872 100644 --- a/module_index.json +++ b/module_index.json @@ -176,7 +176,7 @@ "author": "Starbeamrainbowlabs", "description": "Allows you to view pages. You reallyshould include this one.", "id": "page-view", - "lastupdate": 1451134217, + "lastupdate": 1458574289, "optional": false }, { diff --git a/modules/page-view.php b/modules/page-view.php index c277f43..b69e970 100644 --- a/modules/page-view.php +++ b/modules/page-view.php @@ -102,10 +102,14 @@ register_module([ $content .= "\n\t\t\n"; + // Content only mode: Sends only the raw rendered page + if(isset($_GET["contentonly"]) and $_GET["contentonly"] === "yes") + exit(parse_page_source($content)); + // Printable: Sends a printable version of the page if(isset($_GET["printable"]) and $_GET["printable"] === "yes") exit(page_renderer::render_minimal($title, $content)); - else - exit(page_renderer::render_main($title, $content)); + // Normal page + exit(page_renderer::render_main($title, $content)); }); } ]);