Skip to content

Commit

Permalink
[TASK] Make removeDefaultJs configurable. fixes #105
Browse files Browse the repository at this point in the history
Previous behaviour changed at this point. Inline JavaScript is no longer moved to an external file by default.
  • Loading branch information
benjaminkott committed Dec 4, 2014
1 parent 2f9bfdf commit aebd1fc
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 14 deletions.
14 changes: 8 additions & 6 deletions Configuration/TypoScript/constants.txt
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ page {
# cat=bootstrap package: basic/180/100; type=string; label=Google: Tracking-ID
trackingID =
# cat=bootstrap package: basic/180/110; type=boolean; label=Google: IP-anonymisation
anonymizeIp = 0
anonymizeIp = 1
}
}
}
Expand All @@ -116,15 +116,17 @@ config {
baseURL =
# cat=bootstrap package: advanced/150/110; type=boolean; label=No Cache
no_cache = 0
# cat=bootstrap package: advanced/150/120; type=boolean; label=Compress JavaScript
# cat=bootstrap package: advanced/150/120; type=options[Do not remove=0,Remove=1,Move to external file=external]; label=Remove default JavaScript
removeDefaultJS = 0
# cat=bootstrap package: advanced/150/130; type=boolean; label=Compress JavaScript
compressJs = 1
# cat=bootstrap package: advanced/150/130; type=boolean; label=Compress Css
# cat=bootstrap package: advanced/150/140; type=boolean; label=Compress Css
compressCss = 1
# cat=bootstrap package: advanced/150/140; type=boolean; label=Concatenate JavaScript
# cat=bootstrap package: advanced/150/150; type=boolean; label=Concatenate JavaScript
concatenateJs = 1
# cat=bootstrap package: advanced/150/150; type=boolean; label=Concatenate Css
# cat=bootstrap package: advanced/150/160; type=boolean; label=Concatenate Css
concatenateCss = 1
# cat=bootstrap package: advanced/150/160; type=string; label=Header Comment
# cat=bootstrap package: advanced/150/180; type=string; label=Header Comment
headerComment = Based on the TYPO3 Bootstrap Package by Benjamin Kott - http://www.bk2k.info
}

Expand Down
18 changes: 10 additions & 8 deletions Configuration/TypoScript/setup.txt
Original file line number Diff line number Diff line change
Expand Up @@ -448,11 +448,11 @@ page {
}
10 = TEXT
10.value (
(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', '{$page.tracking.google.trackingID}', 'auto');
(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', '{$page.tracking.google.trackingID}', 'auto');
)
20 = TEXT
20 {
Expand All @@ -461,13 +461,15 @@ page {
}

value (
ga('set', 'anonymizeIp', true);

ga('set', 'anonymizeIp', true);
)
}

90 = TEXT
90.value (
ga('send', 'pageview');

ga('send', 'pageview');
)
}
}
Expand All @@ -493,7 +495,7 @@ config {
renderCharset = utf-8
metaCharset = utf-8
doctype = html5
removeDefaultJS = external
removeDefaultJS = {$config.removeDefaultJS}
inlineStyle2TempFile = 1
admPanel = 1
debug = 0
Expand Down

0 comments on commit aebd1fc

Please sign in to comment.