Merge pull request #5153 from Rob--W/crx-preserve-reference-fragment
Preserve reference fragment in Chromium URL router
This commit is contained in:
commit
86d06d650a
1 changed files with 4 additions and 0 deletions
|
@ -99,6 +99,10 @@ limitations under the License.
|
||||||
var url = parseExtensionURL(details.url);
|
var url = parseExtensionURL(details.url);
|
||||||
if (url) {
|
if (url) {
|
||||||
url = VIEWER_URL + '?file=' + url;
|
url = VIEWER_URL + '?file=' + url;
|
||||||
|
var i = details.url.indexOf('#');
|
||||||
|
if (i > 0) {
|
||||||
|
url += details.url.slice(i);
|
||||||
|
}
|
||||||
console.log('Redirecting ' + details.url + ' to ' + url);
|
console.log('Redirecting ' + details.url + ' to ' + url);
|
||||||
return { redirectUrl: url };
|
return { redirectUrl: url };
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue