Skip to content

Commit

Permalink
modified: src/main.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
jvo203 committed Sep 5, 2023
1 parent 49f9cd1 commit 7dd799f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 64 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "fits_web_ql"
version = "4.4.13"
version = "4.4.14"
authors = ["jvo203 <[email protected]>"]
edition = "2021"

Expand Down
64 changes: 2 additions & 62 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2675,8 +2675,8 @@ lazy_static! {
#[cfg(feature = "jvo")]
static LOG_DIRECTORY: &'static str = "LOGS";

static SERVER_STRING: &'static str = "FITSWebQL v4.4.13";
static VERSION_STRING: &'static str = "R/SV2023-08-08.0";
static SERVER_STRING: &'static str = "FITSWebQL v4.4.14";
static VERSION_STRING: &'static str = "R/SV2023-09-05.0";
static WASM_STRING: &'static str = "WASM2020-06-22.0";
static FPZIP_STRING: &'static str = "WASM2020-06-18.0";

Expand Down Expand Up @@ -4691,66 +4691,6 @@ fn http_fits_response(
</script>\n",
);

//Google Analytics
#[cfg(feature = "development")]
html.push_str(
"<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-72136224-1', 'auto');
ga('send', 'pageview');
</script>\n",
);

#[cfg(feature = "test")]
html.push_str(
"<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-72136224-2', 'auto');
ga('send', 'pageview');
</script>\n",
);

#[cfg(feature = "production")]
html.push_str(
"<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src='https://www.googletagmanager.com/gtag/js?id=G-YM4BZGDN25'></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-YM4BZGDN25');
</script>\n",
);

/*html.push_str(
"<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-72136224-3', 'auto');
ga('send', 'pageview');
</script>\n",
);*/

#[cfg(not(feature = "jvo"))]
html.push_str(
"<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-72136224-5', 'auto');
ga('send', 'pageview');
</script>\n",
);

html.push_str("</body></html>\n");

HttpResponse::Ok()
Expand Down

0 comments on commit 7dd799f

Please sign in to comment.