ALT Linux Bugzilla
– Attachment 12446 Details for
Bug 45191
Поиск через yandex по умолчанию
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
патч от yandex
alt-chromium-Use-yandex-search-as-default.patch (text/plain), 6.08 KB, created by
Vladimir Cherny
on 2023-02-08 17:26:05 MSK
(
hide
)
Description:
патч от yandex
Filename:
MIME Type:
Creator:
Vladimir Cherny
Created:
2023-02-08 17:26:05 MSK
Size:
6.08 KB
patch
obsolete
>Date: Fri, 23 Dec 2022 20:09:16 +0300 >Subject: [PATCH] Use yandex search as default > >--- a/components/search_engines/prepopulated_engines.json >+++ b/components/search_engines/prepopulated_engines.json >@@ -552,7 +552,7 @@ > "keyword": "yandex.by", > "favicon_url": "https://yastatic.net/lego/_/pDu9OWAQKB0s2J9IojKpiS_Eho.ico", > "logo_url": "https://storage.ape.yandex.net/get/browser/Doodles/yandex/drawable-xxhdpi/yandex.png", >- "search_url": "https://yandex.by/{yandex:searchPath}?text={searchTerms}", >+ "search_url": "https://yandex.by/{yandex:searchPath}?text={searchTerms}&from=altos&{yandex:referralID}", > "suggest_url": "https://suggest.yandex.by/suggest-ff.cgi?part={searchTerms}&{google:cursorPosition}", > "image_url": "https://yandex.by/images/search/?rpt=imageview", > "image_url_post_params": "upfile={google:imageThumbnail},original_width={google:imageOriginalWidth},original_height={google:imageOriginalHeight},prg=1", >@@ -565,7 +565,7 @@ > "name": "Yandex", > "keyword": "yandex.com", > "favicon_url": "https://yastatic.net/lego/_/rBTjd6UOPk5913OSn5ZQVYMTQWQ.ico", >- "search_url": "https://yandex.com/search/?text={searchTerms}&from=os&clid=1836588", >+ "search_url": "https://yandex.com/search/?text={searchTerms}&from=altos&{yandex:referralID}", > "suggest_url": "https://suggest.yandex.com/suggest-ff.cgi?part={searchTerms}&{google:cursorPosition}&uil=en&v=3&sn=5", > "image_url": "https://yandex.com/images/search?rpt=imageview", > "image_url_post_params": "upfile={google:imageThumbnail},original_width={google:imageOriginalWidth},original_height={google:imageOriginalHeight},prg=1", >@@ -578,7 +578,7 @@ > "keyword": "yandex.kz", > "favicon_url": "https://yastatic.net/lego/_/pDu9OWAQKB0s2J9IojKpiS_Eho.ico", > "logo_url": "https://storage.ape.yandex.net/get/browser/Doodles/yandex/drawable-xxhdpi/yandex.png", >- "search_url": "https://yandex.kz/{yandex:searchPath}?text={searchTerms}", >+ "search_url": "https://yandex.kz/{yandex:searchPath}?text={searchTerms}&from=altos&{yandex:referralID}", > "suggest_url": "https://suggest.yandex.kz/suggest-ff.cgi?part={searchTerms}&{google:cursorPosition}", > "image_url": "https://yandex.kz/images/search/?rpt=imageview", > "image_url_post_params": "upfile={google:imageThumbnail},original_width={google:imageOriginalWidth},original_height={google:imageOriginalHeight},prg=1", >@@ -592,7 +592,7 @@ > "keyword": "yandex.ru", > "favicon_url": "https://yastatic.net/lego/_/pDu9OWAQKB0s2J9IojKpiS_Eho.ico", > "logo_url": "https://storage.ape.yandex.net/get/browser/Doodles/yandex/drawable-xxhdpi/yandex.png", >- "search_url": "https://yandex.ru/{yandex:searchPath}?text={searchTerms}&{yandex:referralID}", >+ "search_url": "https://yandex.ru/{yandex:searchPath}?text={searchTerms}&from=altos&{yandex:referralID}", > "suggest_url": "https://suggest.yandex.ru/suggest-ff.cgi?part={searchTerms}&{google:cursorPosition}", > "image_url": "https://yandex.ru/images/search/?rpt=imageview", > "image_url_post_params": "upfile={google:imageThumbnail},original_width={google:imageOriginalWidth},original_height={google:imageOriginalHeight},prg=1", >@@ -605,7 +605,7 @@ > "name": "Yandex", > "keyword": "yandex.com.tr", > "favicon_url": "https://yastatic.net/lego/_/rBTjd6UOPk5913OSn5ZQVYMTQWQ.ico", >- "search_url": "https://www.yandex.com.tr/{yandex:searchPath}?text={searchTerms}", >+ "search_url": "https://www.yandex.com.tr/{yandex:searchPath}?text={searchTerms}&from=altos&{yandex:referralID}", > "suggest_url": "https://suggest.yandex.com.tr/suggest-ff.cgi?part={searchTerms}&{google:cursorPosition}", > "image_url": "https://yandex.com.tr/gorsel/search?rpt=imageview", > "image_url_post_params": "upfile={google:imageThumbnail},original_width={google:imageOriginalWidth},original_height={google:imageOriginalHeight},prg=1", >@@ -619,7 +619,7 @@ > "keyword": "yandex.ua", > "favicon_url": "https://yastatic.net/lego/_/pDu9OWAQKB0s2J9IojKpiS_Eho.ico", > "logo_url": "https://storage.ape.yandex.net/get/browser/Doodles/yandex/drawable-xxhdpi/yandex.png", >- "search_url": "https://yandex.ua/{yandex:searchPath}?text={searchTerms}", >+ "search_url": "https://yandex.ua/{yandex:searchPath}?text={searchTerms}&from=altos&{yandex:referralID}", > "suggest_url": "https://suggest.yandex.ua/suggest-ff.cgi?part={searchTerms}&{google:cursorPosition}", > "image_url": "https://yandex.ua/images/search/?rpt=imageview", > "image_url_post_params": "upfile={google:imageThumbnail},original_width={google:imageOriginalWidth},original_height={google:imageOriginalHeight},prg=1", > >--- a/components/search_engines/search_terms_data.cc >+++ b/components/search_engines/search_terms_data.cc >@@ -164,7 +164,7 @@ std::string SearchTermsData::GoogleImageSearchSource() const { > } > > std::string SearchTermsData::GetYandexReferralID() const { >- return std::string(); >+ return "2746753"; > } > > std::string SearchTermsData::GetMailRUReferralID() const { > >--- a/components/search_engines/template_url_prepopulate_data.cc >+++ b/components/search_engines/template_url_prepopulate_data.cc >@@ -1331,6 +1331,12 @@ std::vector<std::unique_ptr<TemplateURLData>> GetPrepopulationSetFromCountryID( > std::vector<std::unique_ptr<TemplateURLData>> t_urls; > for (size_t i = 0; i < num_engines; ++i) > t_urls.push_back(TemplateURLDataFromPrepopulatedEngine(*engines[i])); >+ >+ const auto itr = >+ base::ranges::find(t_urls, yandex_ru.id, &TemplateURLData::prepopulate_id); >+ if (itr == t_urls.end()) { >+ t_urls.push_back(TemplateURLDataFromPrepopulatedEngine(yandex_com)); >+ } > return t_urls; > } > >@@ -1383,7 +1389,7 @@ std::vector<std::unique_ptr<TemplateURLData>> GetPrepopulatedEngines( > } > if (default_search_provider_index) { > const auto itr = >- base::ranges::find(t_urls, google.id, &TemplateURLData::prepopulate_id); >+ base::ranges::find(t_urls, yandex_ru.id, &TemplateURLData::prepopulate_id); > *default_search_provider_index = > itr == t_urls.end() ? 0 : std::distance(t_urls.begin(), itr); > } >-- >2.29.2.windows.3 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 45191
: 12446