|
@@ -53,9 +53,11 @@
|
|
|
const expandButton = document.getElementById( 'expandButton' );
|
|
|
const viewSrcButton = document.getElementById( 'button' );
|
|
|
const panelScrim = document.getElementById( 'panelScrim' );
|
|
|
-
|
|
|
const previewsToggler = document.getElementById( 'previewsToggler' );
|
|
|
|
|
|
+ const sectionLink = document.querySelector( '#sections > a' );
|
|
|
+ const sectionDefaultHref = sectionLink.href;
|
|
|
+
|
|
|
const links = {};
|
|
|
const validRedirects = new Map();
|
|
|
const container = document.createElement( 'div' );
|
|
@@ -120,6 +122,10 @@
|
|
|
|
|
|
updateFilter( files, tags );
|
|
|
|
|
|
+ } else {
|
|
|
+
|
|
|
+ updateLink( '' );
|
|
|
+
|
|
|
}
|
|
|
|
|
|
// Events
|
|
@@ -267,6 +273,25 @@
|
|
|
|
|
|
layoutList( files );
|
|
|
|
|
|
+ updateLink( v );
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ function updateLink( search ) {
|
|
|
+
|
|
|
+ // update docs link
|
|
|
+
|
|
|
+ if ( search ) {
|
|
|
+
|
|
|
+ let link = sectionLink.href.split( /[?#]/ )[ 0 ];
|
|
|
+ sectionLink.href = `${link}?q=${search}`;
|
|
|
+
|
|
|
+ } else {
|
|
|
+
|
|
|
+ sectionLink.href = sectionDefaultHref;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
function filterExample( file, exp, tags ) {
|