JS Api: added an active_page variable to make it easier to denote the context from javascript

This commit is contained in:
czaks 2013-06-24 08:23:09 -04:00
parent 08494f2b2f
commit 3bcf88e842
2 changed files with 14 additions and 4 deletions

View File

@ -3,11 +3,16 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
{% if config.quick_reply %} <script type="text/javascript">
<script type="text/javascript"> {% if config.quick_reply %}
var new_reply_string = "{{ config.button_reply }}"; var new_reply_string = "{{ config.button_reply }}";
</script> {% endif %}
{% endif %} {% if not no_post_form %}
var active_page = "index";
{% else %}
var active_page = "ukko";
{% endif %}
</script>
{% include 'header.html' %} {% include 'header.html' %}
<title>{{ board.url }} - {{ board.name }}</title> <title>{{ board.url }} - {{ board.name }}</title>

View File

@ -2,6 +2,11 @@
<html> <html>
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<script type="text/javascript">
var active_page = "thread";
</script>
{% include 'header.html' %} {% include 'header.html' %}
<title>{{ board.url }} - {{ board.name }}</title> <title>{{ board.url }} - {{ board.name }}</title>
</head> </head>