From 9c51088b12f1e4ecd53464e33f274edef8e094ab Mon Sep 17 00:00:00 2001 From: Jay McCarthy Date: Tue, 23 Sep 2014 21:40:53 -0400 Subject: [PATCH] default search --- pkgs/plt-services/meta/pkg-index/official/static/index.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/plt-services/meta/pkg-index/official/static/index.js b/pkgs/plt-services/meta/pkg-index/official/static/index.js index 5866850ef7..8afc78b6ef 100644 --- a/pkgs/plt-services/meta/pkg-index/official/static/index.js +++ b/pkgs/plt-services/meta/pkg-index/official/static/index.js @@ -303,9 +303,13 @@ $( document ).ready(function() { parse_hash(h); } } var expected_hash = ""; + var default_search = "(!main-distribution)(!main-tests)"; function change_hash ( v ) { - expected_hash = v; - window.location.hash = v; } + if ( v == default_search && expected_hash != v ) { + v = ""; } + if ( v != default_search ) { + expected_hash = v; + window.location.hash = v; } } $(window).bind( 'hashchange', function(e) { var actual_hash = window.location.hash;