@@ -203,14 +203,29 @@ class InjectionTargetsOnWebsite {
203203 buttonsContainerId : 'claude-custom-buttons-container'
204204 } ,
205205 Copilot : {
206- containers : [ 'div.shadow-composer-input' ] ,
207- sendButtons : [
208- 'button.rounded-submitButton[title="Submit message"]' ,
209- 'button[type="button"][title="Submit message"]'
206+ // Updated Copilot selectors (April 2025)
207+ // Container: new Copilot chat composer container
208+ containers : [
209+ 'div.w-expanded-composer.max-w-chat.bg-gradient-to-b' , // main composer container
210+ 'div.relative.max-h-full.w-expanded-composer' , // fallback: outermost
211+ 'div.flex.grow.flex-col.overflow-hidden' , // fallback: inner flex container
212+ 'div.shadow-composer-input' // legacy fallback
210213 ] ,
214+ // Editor: textarea for user input
211215 editors : [
212- 'div.shadow-composer-input textarea#userInput' ,
213- 'textarea#userInput[placeholder="Message Copilot"]'
216+ 'textarea#userInput.block.min-h-user-input.w-full' , // most specific
217+ 'textarea#userInput' , // fallback by id
218+ 'textarea.block.min-h-user-input' , // fallback by class
219+ 'textarea[placeholder="Message Copilot"]' , // fallback by placeholder
220+ 'textarea' // generic fallback
221+ ] ,
222+ // Send button: Copilot's submit button (non-ARIA, non-language-dependent)
223+ sendButtons : [
224+ 'button[type="button"][data-testid="submit-button"]' , // primary: matches Copilot's new submit button
225+ 'button[type="button"].rounded-submitButton[title="Submit message"]' , // matches class and title
226+ 'button[type="button"][title="Submit message"]' , // fallback by type and title
227+ 'button.rounded-submitButton' , // fallback by class only
228+ 'button[type="submit"]' , // legacy fallback
214229 ] ,
215230 buttonsContainerId : 'copilot-custom-buttons-container'
216231 } ,
0 commit comments