File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -180,15 +180,18 @@ window.loadTryExamplesConfig = async (configFilePath) => {
180180 tryExamplesGlobalMinHeight = parseInt ( data . global_min_height ) ;
181181 }
182182
183- // Disable interactive examples if file matches one of the ignore patterns
184- // by hiding try_examples_buttons.
183+ // Selectively enable interactive examples if file matches one of the ignore patterns
184+ // by un- hiding try_examples_buttons.
185185 Patterns = data . ignore_patterns ;
186186 for ( let pattern of Patterns ) {
187187 let regex = new RegExp ( pattern ) ;
188- if ( regex . test ( currentPageUrl ) ) {
189- var buttons = document . getElementsByClassName ( "try_examples_button" ) ;
188+ if ( ! regex . test ( currentPageUrl ) ) {
189+ var buttons = document . getElementsByClassName (
190+ "try_examples_button hidden" ,
191+ ) ;
190192 for ( var i = 0 ; i < buttons . length ; i ++ ) {
191- buttons [ i ] . classList . add ( "hidden" ) ;
193+ console . log ( buttons [ i ] ) ;
194+ buttons [ i ] . classList . remove ( "hidden" ) ;
192195 }
193196 break ;
194197 }
You can’t perform that action at this time.
0 commit comments