blob: 8ee8e45462a0a848b445d74143908d0406e332ae [file] [log] [blame]
Simon Hunt195cb382014-11-03 17:50:51 -08001/*
2 * Copyright 2014 Open Networking Laboratory
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17/*
18 ONOS GUI -- Preamble -- the first thing we do
19
20 @author Simon Hunt
21 */
22
23(function () {
24 // Check if the URL in the address bar contains a parameter section
25 // (delineated by '?'). If this is the case, rewrite using '#' instead.
26
27 var m = /([^?]*)\?(.*)/.exec(window.location.href);
28 if (m) {
29 window.location.href = m[1] + '#' + m[2];
30 }
31
32}());