Merge pull request #73 from iudex-/patch-1

fix gallery redirect, closes #72
This commit is contained in:
Tom Watson 2023-01-03 15:15:46 +01:00 committed by GitHub
commit 48d3b5e6a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -18,7 +18,7 @@ chrome.webRequest.onBeforeRequest.addListener(
}
if (url.pathname.indexOf("/gallery") === 0) {
return { redirectUrl: oldReddit + url.pathname.slice("/gallery".length) };
return { redirectUrl: oldReddit + '/comments' + url.pathname.slice("/gallery".length) };
}
return { redirectUrl: oldReddit + url.pathname + url.search + url.hash };