Browse Source

assign JS-side variable for user theme

Andrew Dolgov 5 years ago
parent
commit
bcb331abad
1 changed files with 7 additions and 5 deletions
  1. 7 5
      index.php

+ 7 - 5
index.php

@@ -45,12 +45,14 @@
 	<?php if (file_exists("local.js")) javascript_tag("local.js") ?>
 
 	<script type="text/javascript">
-	<?php
-		init_js_translations();
+		var _user_theme = "<?php echo $user_theme ?>";
 
-		print get_minified_js(array("tt-irc",
-			"functions", "prefs", "users"));
-	?>
+		<?php
+			init_js_translations();
+
+			print get_minified_js(array("tt-irc",
+				"functions", "prefs", "users"));
+		?>
 	</script>
 
 	<?php