Commit 9a63ac07 authored by Dave Lawrence's avatar Dave Lawrence

Bug 767308 - Bug id should be last field in URL query string (after list_id)

r=glob, a=LpSolit
parent bfabb024
...@@ -24,12 +24,19 @@ ...@@ -24,12 +24,19 @@
[% IF bug.defined %] [% IF bug.defined %]
[% unfiltered_title = "$terms.Bug $bug.bug_id – $bug.short_desc" %] [% unfiltered_title = "$terms.Bug $bug.bug_id – $bug.short_desc" %]
[% javascript = BLOCK %] [% javascript = BLOCK %]
if( !document.location.href.match(/show_bug\.cgi/) && history && history.replaceState ) { if (history && history.replaceState) {
if(!document.location.href.match(/show_bug\.cgi/)) {
history.replaceState( null, history.replaceState( null,
"[% unfiltered_title FILTER js %]", "[% unfiltered_title FILTER js %]",
"show_bug.cgi?id=[% bug.bug_id FILTER js %]" ); "show_bug.cgi?id=[% bug.bug_id FILTER js %]" );
document.title = "[% unfiltered_title FILTER js %]"; document.title = "[% unfiltered_title FILTER js %]";
} }
if (document.location.href.match(/show_bug\.cgi\?.*list_id=/)) {
var href = document.location.href;
href = href.replace(/[\?&]+list_id=(\d+|cookie)/, '');
history.replaceState(null, "[% unfiltered_title FILTER js %]", href);
}
}
[% javascript FILTER none %] [% javascript FILTER none %]
[% END %] [% END %]
[% END %] [% END %]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment