Skip to content

Commit 3bbc613

Browse files
committed
Search: remove workaround for subprojects
Revert #7880 since we now always redirect to the subproject domain.
1 parent caa4171 commit 3bbc613

File tree

2 files changed

+1
-11
lines changed

2 files changed

+1
-11
lines changed

readthedocs/core/static-src/core/js/doc-embed/search.js

-10
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,6 @@ function attach_elastic_search_query_sphinx(data) {
7070
}
7171

7272
var link = result.path + "?highlight=" + $.urlencode(query);
73-
// If we aren't on the main domain of the subproject, link to it.
74-
// TODO: we should always redirect to the main domain instead.
75-
if (result.path.startsWith('/projects/') && !window.location.href.startsWith(result.domain)) {
76-
link = result.domain + link;
77-
}
7873

7974
var item = $('<a>', {'href': link});
8075

@@ -295,11 +290,6 @@ function attach_elastic_search_query_mkdocs(data) {
295290
var blocks = result.blocks;
296291

297292
var link = result.path;
298-
// If we aren't on the main domain of the subproject, link to it.
299-
// TODO: we should always redirect to the main domain instead.
300-
if (result.path.startsWith('/projects/') && !window.location.href.startsWith(result.domain)) {
301-
link = result.domain + link;
302-
}
303293

304294
var item = $('<article>');
305295
item.append(

0 commit comments

Comments
 (0)