Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Minor edit in bottom_scripts.html, mostly re unescaping History.js UR…

…L hash
  • Loading branch information...
commit 27656d9c294915182bf07b6591be90e2eefefe0c 1 parent 6b3f4f8
@tomaszzielinski tomaszzielinski authored
Showing with 5 additions and 13 deletions.
  1. +5 −13 askbot/skins/default/templates/meta/bottom_scripts.html
View
18 askbot/skins/default/templates/meta/bottom_scripts.html
@@ -38,7 +38,7 @@
{% endif %}
></script>
<!-- History.js -->
-<script defer src="{{"/js/jquery.history.js"|media }}"></script>
+<script type='text/javascript' src="{{"/js/jquery.history.js"|media }}"></script>
<script type='text/javascript' src="{{"/js/utils.js"|media }}"></script>
<script type="text/javascript" src="{% url django.views.i18n.javascript_catalog %}"></script>
{% if settings.ENABLE_MATHJAX %}
@@ -52,13 +52,13 @@
{% endif %}
<script type="text/javascript">
{% if active_tab != "tags" and active_tab != "users" %}
-{# start asking question with title from search query #}
$(document).ready(function(){
if (Modernizr.history) {
// history management works!
} else {
// no history support :(
- hash = unescape(window.location.hash).replace('#','').split("?")[0]
+ //hash = unescape(window.location.hash).replace('#','').split("?")[0]
+ hash = History.unescapeHash(window.location.hash).replace('#','').split("?")[0]
if (hash.substring(0,11)==askbot['urls']['questions']){
url = hash
}else{
@@ -68,16 +68,8 @@
window.location = 'http://'+window.location.host+url
}
}
-
- $('#nav_ask').click(
- function(){
- var starting_title = $('#keywords').attr('value');
- var new_url = $(this).attr('href') + '?title=' + encodeURIComponent(starting_title);
- window.location.href = new_url;
- return false;
- }
- );
- //{# focus input on the search bar endcomment #}
+
+ // focus input on the search bar endcomment
{% if active_tab != "ask" %}
$('#keywords').focus();
{% else %}
Please sign in to comment.
Something went wrong with that request. Please try again.