Preserve reference fragment in Chromium URL router

Because removed reference fragments are no longer automatically copied
thanks to https://code.google.com/p/chromium/issues/detail?id=354653
This commit is contained in:
Rob Wu 2014-08-08 12:37:37 +02:00
parent c3fb7ee79a
commit a1671fa512

View File

@ -99,6 +99,10 @@ limitations under the License.
var url = parseExtensionURL(details.url);
if (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);
return { redirectUrl: url };
}