summaryrefslogtreecommitdiff
path: root/templates/main.js
diff options
context:
space:
mode:
authorctrlcctrlv <wizardchan@hush.com>2013-08-17 18:00:26 +0000
committerctrlcctrlv <wizardchan@hush.com>2013-08-17 18:00:26 +0000
commite3600131fc45cb97f27e216aadcfcd69c761014c (patch)
tree502b54c9defad399e5ee0e76871e691830bf92fe /templates/main.js
parent7c5222ffb5621d70a8379ff9aa6948bc121d3d54 (diff)
Configurable canvas size
Diffstat (limited to 'templates/main.js')
-rw-r--r--templates/main.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/templates/main.js b/templates/main.js
index 78054a3b..a9343e4a 100644
--- a/templates/main.js
+++ b/templates/main.js
@@ -265,7 +265,14 @@ function ready() {
onready(init);
-{% endraw %}{% if config.google_analytics %}{% raw %}
+{% endraw %}
+
+var oekaki_options = {
+ width: {{config.oekaki.width}},
+ height: {{config.oekaki.height}},
+};
+
+{% if config.google_analytics %}{% raw %}
var _gaq = _gaq || [];_gaq.push(['_setAccount', '{% endraw %}{{ config.google_analytics }}{% raw %}']);{% endraw %}{% if config.google_analytics_domain %}{% raw %}_gaq.push(['_setDomainName', '{% endraw %}{{ config.google_analytics_domain }}{% raw %}']){% endraw %}{% endif %}{% if not config.google_analytics_domain %}{% raw %}_gaq.push(['_setDomainName', 'none']){% endraw %}{% endif %}{% raw %};_gaq.push(['_trackPageview']);(function() {var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);})();{% endraw %}{% endif %}