blob: 0329d6b6a8feaca29a99306137f07a41cb529a58 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
<script type="text/javascript">
/*<![CDATA[*/
askbot['settings']['showSortByRelevance'] = {% if show_sort_by_relevance %}true{% else %}false{% endif %};
$(document).ready(function(){
/*var on_tab = '#nav_questions';
$(on_tab).attr('className','on');*/
Hilite.exact = false;
Hilite.elementid = "question-list";
Hilite.debug_referrer = location.href;
{% if update_avatar_data == True %}
var today = new Date();{#add timestamp to prevent browser caching #}
$.getJSON('{% url user_update_has_custom_avatar %}?t=' + today.getTime());
{% endif %}
});
askbot['urls']['mark_interesting_tag'] = '{% url mark_interesting_tag %}';
askbot['urls']['mark_ignored_tag'] = '{% url mark_ignored_tag %}';
askbot['urls']['mark_subscribed_tag'] = '{% url mark_subscribed_tag %}';
askbot['urls']['unmark_tag'] = '{% url unmark_tag %}';
askbot['urls']['set_tag_filter_strategy'] = '{% url "set_tag_filter_strategy" %}';
askbot['urls']['question_url_template'] = scriptUrl + '{{'question/'|transurl}}{{ "{{QuestionID}}/" }}';
if (Modernizr.history) {
// history management works!
} else {
// no history support :(
//hash = unescape(window.location.hash).replace('#','').split("?")[0]
{# todo: fix this evil code!!! #}
var hash = History.unescapeHash(window.location.hash).replace('#','').split("?")[0];
var questions_url = askbot['urls']['questions'];
if (hash.substring(0, questions_url.length) === questions_url) {
var url = hash;
} else {
var url = questions_url + hash;
}
if (hash !== '' && hash !== undefined && url !== undefined){
{# was this causing strange redirects in IE??? #}
window.location = 'http://' + window.location.host + url;
}
}
/*]]>*/
</script>
<script type='text/javascript' src='{{"/js/editor.js"|media}}'></script>
{% if request.user.is_authenticated() %}
<script type='text/javascript' src='{{"/js/tag_selector.js"|media}}'></script>
{% endif %}
|