fill-paypal-login.js 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. // background/steps/fill-paypal-login.js — Step 8: Fill PayPal login email
  2. (function attachBackgroundStep13(root, factory) {
  3. root.MultiPageBackgroundStep13 = factory();
  4. })(typeof self !== 'undefined' ? self : globalThis, function createBackgroundStep13Module() {
  5. function createStep13Executor(deps = {}) {
  6. const {
  7. addLog,
  8. generateRandomEmail,
  9. sendToContentScriptResilient,
  10. } = deps;
  11. async function executeStep13(state) {
  12. await addLog('步骤 8:正在填写 PayPal 登录邮箱...');
  13. const email = generateRandomEmail();
  14. await addLog(`已生成随机邮箱: ${email}`);
  15. // The checkout-paypal content script auto-injects on paypal.com via manifest.
  16. // After Stripe form submission, the tab has redirected to paypal.com.
  17. await sendToContentScriptResilient('checkout-paypal', {
  18. type: 'EXECUTE_STEP',
  19. step: 8,
  20. source: 'background',
  21. payload: { email },
  22. });
  23. }
  24. return { executeStep13 };
  25. }
  26. return { createStep13Executor };
  27. });