Remove OAuth-iframe Open Direct Link helper (restore cloud upload icon)

#1
by macayaven - opened
Files changed (1) hide show
  1. src/small_cuts/viewer.py +0 -31
src/small_cuts/viewer.py CHANGED
@@ -242,17 +242,6 @@ footer { display: none !important; }
242
  /* Hide the login pill on sign-in via this wrapper Column (gr.LoginButton ignores visible). */
243
  .sc-upload-signin-box { flex: 0 0 auto !important; width: auto !important; min-width: 0 !important;
244
  padding: 0 !important; display: inline-flex !important; }
245
- .sc-iframe-warn {
246
- font-family: 'IBM Plex Mono', monospace !important;
247
- font-size: .68rem !important;
248
- color: #D4AF37 !important;
249
- text-decoration: underline !important;
250
- margin-right: 8px;
251
- white-space: nowrap;
252
- }
253
- .sc-iframe-warn:hover {
254
- color: #fff5d5 !important;
255
- }
256
  .sc-upload-signin button, .sc-upload-signin a, .sc-upload-signin .lg {
257
  width: auto !important; min-width: 0 !important; max-width: max-content !important;
258
  height: 30px !important; padding: 0 12px !important; border: 1px solid #2A292F !important;
@@ -1658,26 +1647,6 @@ PLAYBACK_SYNC_JS = """
1658
  });
1659
  window.__scStageObs.observe(stageObserverHost, { childList: true, subtree: true });
1660
  }
1661
-
1662
- // OAuth iframe helper: if we are in an iframe, modern browsers block third-party cookies,
1663
- // which makes OAuth sign-in flaky. Show a "Direct link" help text/button next to sign-in.
1664
- if (window.self !== window.top) {
1665
- const checkIframeAuth = () => {
1666
- const authContainer = document.querySelector('.sc-upload-auth');
1667
- if (authContainer && !authContainer.querySelector('.sc-iframe-warn')) {
1668
- const directUrl = window.location.href;
1669
- const tip = 'Sign-in might fail in iframe due to browser cookie limits. '
1670
- + 'Click to open directly in a new tab.';
1671
- const warnHtml = '<a class="sc-iframe-warn" href="' + directUrl
1672
- + '" target="_blank" title="' + tip + '">🔗 Open Direct Link</a>';
1673
- authContainer.insertAdjacentHTML('afterbegin', warnHtml);
1674
- }
1675
- };
1676
- checkIframeAuth();
1677
- // Re-check periodically or on DOM changes to ensure it is added when the top bar renders
1678
- const topbarObs = new MutationObserver(checkIframeAuth);
1679
- topbarObs.observe(document.body, { childList: true, subtree: true });
1680
- }
1681
  }
1682
  """
1683
 
 
242
  /* Hide the login pill on sign-in via this wrapper Column (gr.LoginButton ignores visible). */
243
  .sc-upload-signin-box { flex: 0 0 auto !important; width: auto !important; min-width: 0 !important;
244
  padding: 0 !important; display: inline-flex !important; }
 
 
 
 
 
 
 
 
 
 
 
245
  .sc-upload-signin button, .sc-upload-signin a, .sc-upload-signin .lg {
246
  width: auto !important; min-width: 0 !important; max-width: max-content !important;
247
  height: 30px !important; padding: 0 12px !important; border: 1px solid #2A292F !important;
 
1647
  });
1648
  window.__scStageObs.observe(stageObserverHost, { childList: true, subtree: true });
1649
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1650
  }
1651
  """
1652