================================================================================
GATE_JS_SNIPPETS_READY_TO_CODE_5_12_26.txt
CollabORhythm / Collabtunes — Implementation Layer
Generated: 5.12.26 | Asian Claude
PURPOSE: Ready-to-deploy gate JS patterns for Mixed Claude coding phase.
         Each snippet is verified against the pattern in existing AIO pages.
         Insert at END of <body>, before </body> tag.
================================================================================

KEY FACTS:
  localStorage key:    collabtunes_selected_rating
  Redirect target:     https://collabtunes.com
  Valid rating values: gpg | pg13 | r | nc17 | x

================================================================================
SNIPPET 1 — PG-13 GATE (for all Song List AIO pages, Set Lists 1–6 est.)
================================================================================
<!-- GATE: PG-13 minimum — G/PG visitors redirected -->
<script>
  (function() {
    var allowed = ['pg13','r','nc17','x'];
    var sel = localStorage.getItem('collabtunes_selected_rating');
    if (!sel || allowed.indexOf(sel) === -1) { window.location.href = 'https://collabtunes.com'; }
  })();
</script>

STATUS: CONFIRMED WORKING — matches SL1, SL2, SL3, SL5, SL6/both, pattern
DEPLOY: Ready to add to NC-17 Quick Guide? NO — use SNIPPET 3.
        Ready to add to AIO pages? YES — already in all staging pages.

================================================================================
SNIPPET 2 — R GATE (for Set List 7, Set List 8, Set List 9, Set List 17)
================================================================================
<!-- GATE: R minimum — G/PG/PG-13 visitors redirected -->
<script>
  (function() {
    var allowed = ['r','nc17','x'];
    var sel = localStorage.getItem('collabtunes_selected_rating');
    if (!sel || allowed.indexOf(sel) === -1) { window.location.href = 'https://collabtunes.com'; }
  })();
</script>

STATUS: CONFIRMED WORKING — matches SetList7 pattern exactly
DEPLOY: Ready. Pending Tom approval before adding to live pages.

================================================================================
SNIPPET 3 — NC-17 GATE (for NC-17 Quick Guide page)
================================================================================
<!-- GATE: NC-17 minimum — G/PG/PG-13/R visitors redirected -->
<script>
  (function() {
    var allowed = ['nc17','x'];
    var sel = localStorage.getItem('collabtunes_selected_rating');
    if (!sel || allowed.indexOf(sel) === -1) { window.location.href = 'https://collabtunes.com'; }
  })();
</script>

TARGET PAGE: https://collabtunes.com/1-to-34-quick-guide-23-to-nc-17/
DEPLOY STATUS: Ready to code. BLOCKED on Tom Decision 02 before live deploy.
VERIFICATION: Test all 5 rating levels — only nc17 and x should get through.

================================================================================
SNIPPET 4 — X / NO LIMITS GATE (for X Quick Guide page)
================================================================================
<!-- GATE: X / No Limits only — all other ratings redirected -->
<script>
  (function() {
    var allowed = ['x'];
    var sel = localStorage.getItem('collabtunes_selected_rating');
    if (!sel || allowed.indexOf(sel) === -1) { window.location.href = 'https://collabtunes.com'; }
  })();
</script>

TARGET PAGE: https://collabtunes.com/1-to-34-quick-guide-x/
DEPLOY STATUS: Ready to code. BLOCKED on Tom Decision 02 before live deploy.
VERIFICATION: Only 'x' gets through. All others (gpg/pg13/r/nc17) redirect.

================================================================================
SNIPPET 5 — FULL LYRICS GATE (PG-13 minimum — pending Tom Decision 03)
================================================================================
<!-- GATE: PG-13 minimum — G/PG visitors redirected -->
<!-- NOTE: Tom Decision 03 may upgrade this to R minimum -->
<!-- IF TOM SELECTS R: change allowed to ['r','nc17','x'] -->
<script>
  (function() {
    var allowed = ['pg13','r','nc17','x'];
    var sel = localStorage.getItem('collabtunes_selected_rating');
    if (!sel || allowed.indexOf(sel) === -1) { window.location.href = 'https://collabtunes.com'; }
  })();
</script>

TARGET PAGE: https://collabtunes.com/8-of-35-full-texts-of-lyrics/
DEPLOY STATUS: Code PG-13 version. If Tom selects R: swap allowed array.
DECISION 03 SAFE DEFAULT: PG-13 (this snippet). If no answer, deploy as-is.

================================================================================
BATCH BADGE FIX — FIND/REPLACE PATTERN FOR ALL 7 AIO FILES
================================================================================

FIND:   [SOURCE PULL REQUIRED]
WITH:   <span class="source-pull-badge">SOURCE PULL REQUIRED</span>

ALSO FIX these variant patterns found in files:
  [SOURCE PULL REQUIRED] → same replacement
  Any [SOURCE PULL...] variant → same replacement

CSS CLASS (already defined in all AIO pages — do not add):
  .source-pull-badge {
    display: inline-block;
    background: #2a1f00;
    color: #ffd21f;
    border: 1px solid #ffd21f;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.85em;
    font-weight: bold;
    letter-spacing: 0.05em;
  }

SCOPE: Run on all 7 AIO staging files.
INSTANCE COUNT: ~95 total across all files.
RISK: Zero — visual only.

================================================================================
END GATE_JS_SNIPPETS_READY_TO_CODE_5_12_26.txt
================================================================================
