Skip to content

Commit 54b7e4d

Browse files
committed
Revert "Docs and examples switch retains filter"
This reverts commit d49dbf8.
1 parent d49dbf8 commit 54b7e4d

File tree

2 files changed

+0
-60
lines changed

2 files changed

+0
-60
lines changed

docs/index.html

-30
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ <h1><a href="https://threejs.org">three.js</a></h1>
5353
const exitSearchButton = document.getElementById( 'exitSearchButton' );
5454
const panelScrim = document.getElementById( 'panelScrim' );
5555
const filterInput = document.getElementById( 'filterInput' );
56-
const sectionLink = document.querySelector('#sections > a');
5756
let iframe = document.querySelector( 'iframe' );
5857

5958
const pageProperties = {};
@@ -186,10 +185,6 @@ <h1><a href="https://threejs.org">three.js</a></h1>
186185

187186
updateFilter();
188187

189-
} else {
190-
191-
updateLink('');
192-
193188
}
194189

195190
}
@@ -392,31 +387,6 @@ <h1><a href="https://threejs.org">three.js</a></h1>
392387

393388
displayFilteredPanel();
394389

395-
updateLink(v);
396-
397-
}
398-
399-
function updateLink(search) {
400-
401-
// update examples link
402-
403-
if ( ! sectionLink.href2 ) {
404-
405-
sectionLink.href2 = sectionLink.href;
406-
407-
}
408-
409-
if (search) {
410-
411-
let link = sectionLink.href.split(/[?#]/)[0];
412-
sectionLink.href = `${link}?q=${search}`;
413-
414-
} else {
415-
416-
sectionLink.href = sectionLink.href2;
417-
418-
}
419-
420390
}
421391

422392
function displayFilteredPanel() {

examples/index.html

-30
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ <h1><a href="https://threejs.org">three.js</a></h1>
5353
const expandButton = document.getElementById( 'expandButton' );
5454
const viewSrcButton = document.getElementById( 'button' );
5555
const panelScrim = document.getElementById( 'panelScrim' );
56-
const sectionLink = document.querySelector('#sections > a');
5756

5857
const previewsToggler = document.getElementById( 'previewsToggler' );
5958

@@ -121,10 +120,6 @@ <h1><a href="https://threejs.org">three.js</a></h1>
121120

122121
updateFilter( files, tags );
123122

124-
} else {
125-
126-
updateLink('');
127-
128123
}
129124

130125
// Events
@@ -272,31 +267,6 @@ <h1><a href="https://threejs.org">three.js</a></h1>
272267

273268
layoutList( files );
274269

275-
updateLink(v);
276-
277-
}
278-
279-
function updateLink(search) {
280-
281-
// update examples link
282-
283-
if ( ! sectionLink.href2 ) {
284-
285-
sectionLink.href2 = sectionLink.href;
286-
287-
}
288-
289-
if (search) {
290-
291-
let link = sectionLink.href.split(/[?#]/)[0];
292-
sectionLink.href = `${link}?q=${search}`;
293-
294-
} else {
295-
296-
sectionLink.href = sectionLink.href2;
297-
298-
}
299-
300270
}
301271

302272
function filterExample( file, exp, tags ) {

0 commit comments

Comments
 (0)