@@ -2088,6 +2088,23 @@ <h3>e-Books by @f</h3>
2088
2088
const grokOptions = document . querySelectorAll ( '.grok-mode-option' ) ;
2089
2089
let isGrokDropdownVisible = false ;
2090
2090
2091
+ // Add event listeners for all platform buttons
2092
+ const platformButtons = document . querySelectorAll ( '.platform-tag' ) ;
2093
+ platformButtons . forEach ( button => {
2094
+ button . addEventListener ( 'click' , ( ) => {
2095
+ const platform = button . getAttribute ( 'data-platform' ) ;
2096
+ // If platform is not github-copilot, set audience to "everyone"
2097
+ if ( platform !== 'github-copilot' ) {
2098
+ audienceSelect . value = 'everyone' ;
2099
+ document . body . classList . remove ( 'dev-mode' ) ;
2100
+ // Trigger filtering if needed
2101
+ if ( typeof filterPrompts === 'function' ) {
2102
+ filterPrompts ( ) ;
2103
+ }
2104
+ }
2105
+ } ) ;
2106
+ } ) ;
2107
+
2091
2108
// Hide dropdown when clicking outside
2092
2109
document . addEventListener ( 'click' , ( e ) => {
2093
2110
if ( ! e . target . closest ( '.platform-tag-container' ) ) {
@@ -2112,6 +2129,14 @@ <h3>e-Books by @f</h3>
2112
2129
grokButton . textContent = selectedText ;
2113
2130
grokDropdown . style . display = 'none' ;
2114
2131
isGrokDropdownVisible = false ;
2132
+
2133
+ // Also set audience to "everyone" for Grok options
2134
+ audienceSelect . value = 'everyone' ;
2135
+ document . body . classList . remove ( 'dev-mode' ) ;
2136
+ // Trigger filtering if needed
2137
+ if ( typeof filterPrompts === 'function' ) {
2138
+ filterPrompts ( ) ;
2139
+ }
2115
2140
} ) ;
2116
2141
} ) ;
2117
2142
} ) ;
0 commit comments