File tree Expand file tree Collapse file tree 10 files changed +12
-321
lines changed
Expand file tree Collapse file tree 10 files changed +12
-321
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ export function getShadowContainer() {
1313
1414export const getShadowHostId = ( ) => "test-shadow" ;
1515
16- const BASE_URL = process . env . NODE_ENV === "development" ? "http://localhost:3000" : "https://multipost.app" ;
16+ const BASE_URL = "https://multipost.app" ;
1717
1818export const getStyle = ( ) => {
1919 const style = document . createElement ( "style" ) ;
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ export async function ArticleJuejin(data: SyncData) {
6262 cancelable : true ,
6363 clipboardData : new DataTransfer ( ) ,
6464 } ) ;
65- pasteEvent . clipboardData ?. setData ( "text/html" , articleData . content || "" ) ;
65+ pasteEvent . clipboardData ?. setData ( "text/html" , articleData . htmlContent || "" ) ;
6666 editor . dispatchEvent ( pasteEvent ) ;
6767 editor . dispatchEvent ( new Event ( "input" , { bubbles : true } ) ) ;
6868 editor . dispatchEvent ( new Event ( "change" , { bubbles : true } ) ) ;
@@ -77,7 +77,7 @@ export async function ArticleJuejin(data: SyncData) {
7777 console . debug ( "sendButton" , sendButton ) ;
7878
7979 if ( sendButton ) {
80- if ( data . autoPublish ) {
80+ if ( data . isAutoPublish ) {
8181 console . debug ( "自动发布:点击发布按钮" ) ;
8282 sendButton . dispatchEvent ( new Event ( "click" , { bubbles : true } ) ) ;
8383 } else {
Original file line number Diff line number Diff line change @@ -158,7 +158,7 @@ export async function DynamicFacebook(data: SyncData) {
158158
159159 console . debug ( "sendButton" , sendButton ) ;
160160 if ( sendButton ) {
161- if ( data . autoPublish ) {
161+ if ( data . isAutoPublish ) {
162162 console . debug ( "自动发布:点击发布按钮" ) ;
163163 sendButton . dispatchEvent ( new Event ( "click" , { bubbles : true } ) ) ;
164164 } else {
Original file line number Diff line number Diff line change @@ -189,7 +189,7 @@ export async function DynamicInstagram(data: SyncData) {
189189 return ;
190190 }
191191
192- if ( data . autoPublish ) {
192+ if ( data . isAutoPublish ) {
193193 console . debug ( "自动发布:点击分享按钮" ) ;
194194 shareButton . dispatchEvent ( new Event ( "click" , { bubbles : true } ) ) ;
195195 } else {
Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ export async function DynamicJuejin(data: SyncData) {
8989 }
9090
9191 // 查找发布按钮
92- if ( data . autoPublish ) {
92+ if ( data . isAutoPublish ) {
9393 const buttons = document . querySelectorAll ( "button" ) ;
9494 console . debug ( "buttons" , buttons ) ;
9595 const sendButton = Array . from ( buttons ) . find ( ( btn ) => btn . textContent ?. includes ( "发布" ) ) ;
Original file line number Diff line number Diff line change @@ -116,7 +116,7 @@ export async function DynamicLinkedin(data: SyncData) {
116116 const sendButton = document . querySelector ( "button.share-actions__primary-action" ) as HTMLButtonElement ;
117117 console . debug ( "sendButton" , sendButton ) ;
118118 if ( sendButton ) {
119- if ( data . autoPublish ) {
119+ if ( data . isAutoPublish ) {
120120 console . debug ( "自动发布:点击发布按钮" ) ;
121121 sendButton . click ( ) ;
122122 } else {
Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ export async function DynamicMaimai(data: SyncData) {
120120 console . debug ( "sendButton" , sendButton ) ;
121121
122122 if ( sendButton ) {
123- if ( data . autoPublish ) {
123+ if ( data . isAutoPublish ) {
124124 console . debug ( "自动发布:点击发布按钮" ) ;
125125 sendButton . dispatchEvent ( new Event ( "click" , { bubbles : true } ) ) ;
126126 } else {
Original file line number Diff line number Diff line change @@ -116,7 +116,7 @@ export async function DynamicReddit(data: SyncData) {
116116 }
117117
118118 // 自动提交
119- if ( data . autoPublish ) {
119+ if ( data . isAutoPublish ) {
120120 await new Promise ( ( resolve ) => setTimeout ( resolve , 5000 ) ) ;
121121
122122 const submitButton = document . querySelector ( "r-post-form-submit-button#submit-post-button" ) ;
You can’t perform that action at this time.
0 commit comments