mirror of
https://github.com/iamadamdev/bypass-paywalls-chrome
synced 2025-04-30 01:04:26 +02:00
update UA for haaretz, themarker (#1249)
This commit is contained in:
parent
66e3afed16
commit
d7a511000b
@ -182,7 +182,9 @@ const useGoogleBotSites = [
|
||||
];
|
||||
|
||||
// Override User-Agent with Bingbot
|
||||
const useBingBot = [
|
||||
const useBingBot = [];
|
||||
|
||||
const useGoogleAdsBotMobile = [
|
||||
'haaretz.co.il',
|
||||
'haaretz.com',
|
||||
'themarker.com'
|
||||
@ -257,6 +259,7 @@ const userAgentDesktop = 'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.go
|
||||
const userAgentMobile = 'Chrome/41.0.2272.96 Mobile Safari/537.36 (compatible ; Googlebot/2.1 ; +http://www.google.com/bot.html)';
|
||||
const userAgentDesktopBingBot = 'Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)';
|
||||
const userAgentMobileBingBot = 'Chrome/80.0.3987.92 Mobile Safari/537.36 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)';
|
||||
const userAgentGoogleAdsBotMobile = 'Mozilla/5.0 (Linux; Android 5.0; SM-G920A) AppleWebKit (KHTML, like Gecko) Chrome Mobile Safari (compatible; AdsBot-Google-Mobile; +http://www.google.com/mobile/adsbot.html)';
|
||||
|
||||
let enabledSites = [];
|
||||
|
||||
@ -445,6 +448,15 @@ extensionApi.webRequest.onBeforeSendHeaders.addListener(function (details) {
|
||||
});
|
||||
}
|
||||
|
||||
// override User-Agent to use Google AdsBot Mobile Web
|
||||
if (matchUrlDomain(useGoogleAdsBotMobile, details.url)) {
|
||||
requestHeaders.push({
|
||||
name: 'User-Agent',
|
||||
value: userAgentGoogleAdsBotMobile
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// remove cookies before page load
|
||||
const enabledCookies = allowCookies.some(function (site) {
|
||||
return matchUrlDomain(site, details.url);
|
||||
|
Loading…
x
Reference in New Issue
Block a user