Changeset 2a76184 in Klonkt for src/assets/js
- Timestamp:
- 07/28/2026 09:11:34 AM (6 weeks ago)
- Branches:
- main
- Children:
- 65abc85
- Parents:
- bdb78e4
- File:
-
- 1 edited
-
src/assets/js/guardian.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/assets/js/guardian.js
rbdb78e4 r2a76184 117 117 wave.addEventListener('click', function () { sendWave(w.other_uri, wave); }); 118 118 row.appendChild(wave); 119 // Gated feature: external (non-fediverse) embeds. Off by default for a 120 // ward; only a guardian can open it, and the gate is enforced server-side 121 // when the feed is built, so this button is the only thing that moves it. 122 if (w.embeds !== null && w.embeds !== undefined) { 123 var emb = el('button', 'quiet small', (w.embeds ? T.embeds_on : T.embeds_off) || 'Embeds'); 124 emb.addEventListener('click', function () { 125 emb.disabled = true; 126 fetch('/guardian/wards/embeds', { 127 method: 'POST', headers: { 'Content-Type': 'application/json' }, 128 body: JSON.stringify({ uri: w.other_uri, allow: !w.embeds }), 129 }).then(function (r) { return r.json(); }) 130 .then(function () { refresh(); }) 131 .catch(function () { emb.disabled = false; }); 132 }); 133 row.appendChild(emb); 134 } 119 135 var btn = el('button', 'quiet small', T.release); 120 136 // Releasing a ward is heavy and hard to undo (coming back needs a fresh
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)