Remove unnecessary code (#671)

This commit is contained in:
Nguyễn Kim Kha 2020-05-28 10:42:07 +10:00 committed by GitHub
parent 8adffed422
commit cec5d46f3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -289,7 +289,7 @@ extensionApi.webRequest.onBeforeSendHeaders.addListener(function (details) {
// this fixes images not being loaded on cooking.nytimes.com main page
// referrer has to be *nytimes.com otherwise returns 403
requestHeader.value = 'https://cooking.nytimes.com';
} else if (isSameDomain(details.url, 'wsj.com') || isSameDomain(details.url, 'ft.com') || isSameDomain(details.url, 'fd.nl')) {
} else if (isSameDomain(details.url, 'fd.nl')) {
requestHeader.value = 'https://www.facebook.com/';
} else {
requestHeader.value = 'https://www.google.com/';
@ -305,7 +305,7 @@ extensionApi.webRequest.onBeforeSendHeaders.addListener(function (details) {
// otherwise add it
if (!setReferer) {
if (isSameDomain(details.url, 'wsj.com') || isSameDomain(details.url, 'ft.com') || isSameDomain(details.url, 'fd.nl')) {
if (isSameDomain(details.url, 'fd.nl')) {
requestHeaders.push({
name: 'Referer',
value: 'https://www.facebook.com/'