This repository was archived by the owner on Aug 27, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -56,7 +56,9 @@ class TwitterHook {
5656 if ( handle && syncing === true ) {
5757 this . main . xlog ( 'info' , 'Sync triggered.' ) ;
5858
59- const tweet = ( < HTMLElement > document . querySelector ( '[data-testid=tweetTextarea_0]' ) ) ?. innerText ;
59+ const tweet =
60+ msg . tweet_text || // Get directly from request
61+ ( < HTMLElement > document . querySelector ( '[data-testid=tweetTextarea_0]' ) ) ?. innerText ; // Grab from frontend
6062
6163 const attachmentUrls = Array . from (
6264 document . querySelectorAll (
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ let tabId: number | undefined;
1919const beforeRequestListener = ( details : chrome . webRequest . WebRequestBodyDetails ) => {
2020 let data ;
2121 let for_uri : string | null = null ;
22+ let tweet_text : string ;
2223 if ( details . requestBody ?. raw ?. [ 0 ] ?. bytes ) {
2324 const enc = new TextDecoder ( 'utf-8' ) ;
2425 const arr = new Uint8Array ( details . requestBody . raw [ 0 ] . bytes ) ;
@@ -33,6 +34,7 @@ const beforeRequestListener = (details: chrome.webRequest.WebRequestBodyDetails)
3334 // Is quote
3435 for_uri = data . variables . attachment_url ;
3536 }
37+ tweet_text = data . variables . tweet_text ;
3638 }
3739 if ( ! hasDarkQueries [ data . queryId ] ) {
3840 chrome . tabs . query ( { active : true , currentWindow : true } , function ( tabs ) {
@@ -41,6 +43,7 @@ const beforeRequestListener = (details: chrome.webRequest.WebRequestBodyDetails)
4143 chrome . tabs . sendMessage ( tabId , {
4244 type : 'create-tweet-start' ,
4345 for_uri,
46+ tweet_text,
4447 } ) ;
4548 }
4649 } ) ;
You can’t perform that action at this time.
0 commit comments