diff --git a/Client/Assets/TopSites/yahoo-jp.png b/Client/Assets/TopSites/yahoo-jp.png new file mode 100644 index 00000000000..22e6fc83b93 Binary files /dev/null and b/Client/Assets/TopSites/yahoo-jp.png differ diff --git a/Client/Assets/top_sites.json b/Client/Assets/top_sites.json index 0940be719bb..29ba718f128 100755 --- a/Client/Assets/top_sites.json +++ b/Client/Assets/top_sites.json @@ -1360,6 +1360,13 @@ "background_color": "#5009a7", "domain": "yahoo.com" }, + { + "title": "yahoo-jp", + "url": "https://yahoo.co.jp/", + "image_url": "yahoo-jp.png", + "background_color": "#ffffff", + "domain": "yahoo.co.jp" + }, { "title": "yelp", "url": "http://yelp.com/", diff --git a/Client/Frontend/Browser/Favorites/PreloadedFavorites.swift b/Client/Frontend/Browser/Favorites/PreloadedFavorites.swift index 2c4169e5abd..0ea0a092369 100644 --- a/Client/Frontend/Browser/Favorites/PreloadedFavorites.swift +++ b/Client/Frontend/Browser/Favorites/PreloadedFavorites.swift @@ -40,6 +40,28 @@ struct PreloadedFavorites { return list } + + func appendJapaneseWebsites() -> [FavoriteSite] { + var list = [FavoriteSite]() + + if let url = URL(string: "https://m.youtube.com/") { + list.append(FavoriteSite(url: url, title: "YouTube")) + } + + if let url = URL(string: "https://m.yahoo.co.jp/") { + list.append(FavoriteSite(url: url, title: "Yahoo! Japan")) + } + + if let url = URL(string: "https://brave.com/ja/ntp-tutorial") { + list.append(FavoriteSite(url: url, title: "Braveガイド")) + } + + if let url = URL(string: "https://mobile.twitter.com/") { + list.append(FavoriteSite(url: url, title: "Twitter")) + } + + return list + } var preloadedFavorites = [FavoriteSite]() @@ -55,6 +77,8 @@ struct PreloadedFavorites { // try? list.append(FavoriteSite(url: "https://allegro.pl/".asURL(), title: "Allegro")) preloadedFavorites += appendPopularEnglishWebsites() break + case "JP": + preloadedFavorites += appendJapaneseWebsites() default: preloadedFavorites += appendPopularEnglishWebsites() }