Port: Replace Google image search link with Google Lens.

And: Switch Google image search back to old version, thanks to https://boards.4channel.org/g/thread/91737566#p91789527
from f3f03f5e79fb5f26c0fd4406b2ab6796851ea471 and c68a8afbdf30e3cbb35f0834b364f20600151adf
This commit is contained in:
Tuxedo Takodachi 2023-03-18 10:25:58 +01:00
parent 94ae31f6f5
commit b2e4b345a0
2 changed files with 14 additions and 1 deletions

View File

@ -798,6 +798,19 @@ vp-replace
set('archiveLists', data['archiveLists'].replace('https://nstepien.github.io/archives.json/archives.json', 'https://4chenz.github.io/archives.json/archives.json'));
}
}
if (compareString < '00001.00014.00022.00002') {
if (data['sauces']) {
set('sauces', data['sauces'].replace(/^#?\s*https:\/\/www\.google\.com\/searchbyimage\?image_url=%(IMG|T?URL)&safe=off(?=$|;)/mg, 'https://lens.google.com/uploadbyurl?url=%$1'));
}
}
if (compareString < '00001.00014.00022.00003') {
if (data['sauces']) {
set('sauces', data['sauces'].replace(/^#?\s*https:\/\/lens\.google\.com\/uploadbyurl\?url=%(IMG|T?URL)(?=$|;)/mg, 'https://www.google.com/searchbyimage?sbisrc=4chanx&image_url=%$1&safe=off'));
addSauces([
'#https://lens.google.com/uploadbyurl?url=%IMG;text:lens'
]);
}
}
return changes;
},

View File

@ -791,7 +791,7 @@ https://flickr.com/photo.gne?id=%$1;regexp:/^(\\d+)_[\\da-f]{10}(?:_\\w)*\\b/
https://www.facebook.com/photo.php?fbid=%$1;regexp:/^\\d+_(\\d+)_\\d+_[no]\\b/
# Reverse image search:
https://www.google.com/searchbyimage?image_url=%IMG&safe=off
https://www.google.com/searchbyimage?sbisrc=4chanx&image_url=%IMG&safe=off
https://yandex.com/images/search?rpt=imageview&url=%IMG
#//tineye.com/search?url=%IMG
#//www.bing.com/images/search?q=imgurl:%IMG&view=detailv2&iss=sbi#enterInsights