Changeset d22b55c in Klonkt for src/views/pages/post.ejs
- Timestamp:
- 06/26/2026 04:10:22 PM (2 months ago)
- Branches:
- main
- Children:
- 781d613
- Parents:
- 84903a1
- File:
-
- 1 edited
-
src/views/pages/post.ejs (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/views/pages/post.ejs
r84903a1 rd22b55c 109 109 function go(raw, uri){ 110 110 var d = (raw||'').trim().replace(/^@?[^@\s]*@/, '').replace(/^https?:\/\//i, '').replace(/\/.*$/, '').trim(); 111 if (d) location.href = 'https://' + d + '/authorize_interaction?uri=' + encodeURIComponent(uri||'');111 if (d) { try { localStorage.setItem('pcmsFediServer', d); } catch(e){} location.href = 'https://' + d + '/authorize_interaction?uri=' + encodeURIComponent(uri||''); } 112 112 } 113 113 function place(f, b){ … … 127 127 f.className = 'fedi-remote-form'; 128 128 f.dataset.uri = b.getAttribute('data-fedi-uri') || ''; 129 f.innerHTML = '<input type="text" autocomplete="off" spellcheck="false">'129 f.innerHTML = '<input type="text" name="fediserver" autocomplete="on" list="pcms-fedi-srv" spellcheck="false">' 130 130 + '<button type="submit" class="btn btn-primary fedi-remote-go" aria-label="ok">→</button>' 131 + '<button type="button" class="fedi-remote-cancel" aria-label="x">×</button>'; 132 f.querySelector('input').placeholder = b.getAttribute('data-fedi-ph') || 'mastodon.social'; 131 + '<button type="button" class="fedi-remote-cancel" aria-label="x">×</button>' 132 + '<datalist id="pcms-fedi-srv"><option value="mastodon.social"></option><option value="mastodon.online"></option><option value="mas.to"></option><option value="fosstodon.org"></option><option value="hachyderm.io"></option></datalist>'; 133 var _inp = f.querySelector('input'); 134 _inp.placeholder = b.getAttribute('data-fedi-ph') || 'mastodon.social'; 135 try { var _sv = localStorage.getItem('pcmsFediServer'); if (_sv) _inp.value = _sv; } catch(e){} 133 136 document.body.appendChild(f); // floating popover → no layout reflow 134 137 place(f, b); current = f; currentBtn = b; 135 f.querySelector('input').focus();138 _inp.focus(); _inp.select(); 136 139 return; 137 140 }
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)