Update custom sites (add_ext_link: Google Search Tool)

This commit is contained in:
magnolia1234 2023-08-19 07:42:37 +02:00
parent 610c1d31bc
commit aca515059b
8 changed files with 21 additions and 7 deletions

View file

@ -960,7 +960,7 @@ Remember to check the [previous requests](https://gitlab.com/magnolia1234/bypass
3. Disable Javascript on the site (by browser, uBlock Origin or other add-on). 3. Disable Javascript on the site (by browser, uBlock Origin or other add-on).
4. Add the domain as custom site for more bypass options. 4. Add the domain as custom site for more bypass options.
5. Open page in reader view (by browser or add-on). 5. Open page in reader view (by browser or add-on).
6. Try one of the archive sites. 6. Try one of the archive sites (for Google Search Tool test url & copy html (tab) code to https://codebeautify.org/htmlviewer or https://html.onlineviewer.net).
### Add custom site ### Add custom site
Add your own custom site (also for testing). Add your own custom site (also for testing).

View file

@ -432,7 +432,7 @@ ext_api.storage.local.get({
var sites_default = items.sites_default; var sites_default = items.sites_default;
customSites = items.sites_custom; customSites = items.sites_custom;
customSites = filterObject(customSites, function (val, key) { customSites = filterObject(customSites, function (val, key) {
return !(val.add_ext_link && (!val.add_ext_link_type || val.add_ext_link_type === 'google_search_tool')) return !(val.add_ext_link && !val.add_ext_link_type)
}); });
customSites_domains = Object.values(customSites).map(x => x.domain); customSites_domains = Object.values(customSites).map(x => x.domain);
updatedSites = items.sites_updated; updatedSites = items.sites_updated;

View file

@ -11,6 +11,7 @@ Fix Ksta.de & Rundschau-online.de (json)
Fix The Press-Enterprise (new domain) Fix The Press-Enterprise (new domain)
Fix WSJ (remove option to disable Googlebot) Fix WSJ (remove option to disable Googlebot)
Grouping/fix GenomeWeb sites (Crain) Grouping/fix GenomeWeb sites (Crain)
Update custom sites (add_ext_link: Google Search Tool)
* v3.2.9.0 (2023-08-13) * v3.2.9.0 (2023-08-13)
Add 4 more Lee Enterprises Group sites Add 4 more Lee Enterprises Group sites

View file

@ -223,6 +223,9 @@ if (bg2csData.add_ext_link) {
case 'google_webcache': case 'google_webcache':
article.firstChild.before(googleWebcacheLink(url)); article.firstChild.before(googleWebcacheLink(url));
break; break;
case 'google_search_tool':
article.firstChild.before(googleSearchToolLink(url));
break;
} }
} }
} }
@ -5608,6 +5611,10 @@ function googleWebcacheLink(url, text_fail = 'BPC > Try for full article text:\r
return externalLink(['webcache.googleusercontent.com'], 'https://{domain}/search?q=cache:{url}', url, text_fail); return externalLink(['webcache.googleusercontent.com'], 'https://{domain}/search?q=cache:{url}', url, text_fail);
} }
function googleSearchToolLink(url, text_fail = 'BPC > Full article text (test url & copy html (tab) code to [https://codebeautify.org/htmlviewer] or [https://html.onlineviewer.net]):\r\n') {
return externalLink(['search.google.com'], 'https://search.google.com/test/rich-results?url={url}', encodeURIComponent(url), text_fail);
}
function ext_12ftLink(url, text_fail = 'BPC > Try for full article text:\r\n') { function ext_12ftLink(url, text_fail = 'BPC > Try for full article text:\r\n') {
return externalLink(['12ft.io'], 'https://{domain}/{url}', url, text_fail); return externalLink(['12ft.io'], 'https://{domain}/{url}', url, text_fail);
} }

View file

@ -51,5 +51,5 @@
"webRequestBlocking", "webRequestBlocking",
"*://*/*" "*://*/*"
], ],
"version": "3.2.9.5" "version": "3.2.9.6"
} }

View file

@ -512,6 +512,12 @@
"block_regex": "\\.thefashionlaw\\.com\\/evolok\\/.+\\/ev-widgets\\.min\\.js", "block_regex": "\\.thefashionlaw\\.com\\/evolok\\/.+\\/ev-widgets\\.min\\.js",
"domain": "thefashionlaw.com" "domain": "thefashionlaw.com"
}, },
"Theinformation.com": {
"add_ext_link": "div[data-paywall]|div.locked",
"add_ext_link_type": "google_search_tool",
"allow_cookies": 1,
"domain": "theinformation.com"
},
"Themonthly.com.au": { "Themonthly.com.au": {
"domain": "themonthly.com.au" "domain": "themonthly.com.au"
}, },

View file

@ -789,5 +789,5 @@
"*://*.wyleex.com/*", "*://*.wyleex.com/*",
"*://webcache.googleusercontent.com/*" "*://webcache.googleusercontent.com/*"
], ],
"version": "3.2.9.5" "version": "3.2.9.6"
} }

View file

@ -9,7 +9,7 @@ var custom_switch = ((manifestData.optional_permissions && manifestData.optional
var useragent_options = ['', 'googlebot', 'bingbot', 'facebookbot']; var useragent_options = ['', 'googlebot', 'bingbot', 'facebookbot'];
var referer_options = ['', 'facebook', 'google', 'twitter']; var referer_options = ['', 'facebook', 'google', 'twitter'];
var random_ip_options = ['', 'all', 'eu']; var random_ip_options = ['', 'all', 'eu'];
var add_ext_link_type_options = ['', 'archive.is', '12ft.io', 'google_webcache'] var add_ext_link_type_options = ['', 'archive.is', '12ft.io', 'google_webcache', 'google_search_tool'];
function capitalize(str) { function capitalize(str) {
return (typeof str === 'string') ? str.charAt(0).toUpperCase() + str.slice(1) : ''; return (typeof str === 'string') ? str.charAt(0).toUpperCase() + str.slice(1) : '';
@ -37,7 +37,7 @@ function save_options() {
if (textareaEl.value) { if (textareaEl.value) {
var sites_custom = JSON.parse(textareaEl.value); var sites_custom = JSON.parse(textareaEl.value);
sites_custom = filterObject(sites_custom, function (val, key) { sites_custom = filterObject(sites_custom, function (val, key) {
return !(val.add_ext_link && (!val.add_ext_link_type || val.add_ext_link_type === 'google_search_tool')) return !(val.add_ext_link && !val.add_ext_link_type)
}); });
} }
ext_api.storage.local.set({ ext_api.storage.local.set({
@ -95,7 +95,7 @@ function import_json(result) {
sites_custom[site] = sites_custom_new[site]; sites_custom[site] = sites_custom_new[site];
} }
sites_custom = filterObject(sites_custom, function (val, key) { sites_custom = filterObject(sites_custom, function (val, key) {
return !(val.add_ext_link && (!val.add_ext_link_type || val.add_ext_link_type === 'google_search_tool')) return !(val.add_ext_link && !val.add_ext_link_type)
}); });
ext_api.storage.local.set({ ext_api.storage.local.set({
sites_custom: sites_custom sites_custom: sites_custom