Changeset bca83f3 in Klonkt


Ignore:
Timestamp:
06/26/2026 04:15:59 PM (2 months ago)
Author:
Robin Genis <roboburr@…>
Branches:
main
Children:
7eee449
Parents:
781d613
Message:

feat(fedi): autofill remembers only the last server (drop the suggestion dropdown)

Per request: keep the localStorage prefill of the last-used server, remove the
datalist of common Mastodon servers.

Location:
src/views/pages
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/views/pages/newspaper.ejs

    r781d613 rbca83f3  
    151151      close();
    152152      var f = document.createElement('form'); f.className='fedi-remote-form'; f.dataset.uri = b.getAttribute('data-fedi-uri')||'';
    153       f.innerHTML = '<input type="text" name="fediserver" autocomplete="on" list="pcms-fedi-srv" spellcheck="false"><button type="submit" class="btn btn-primary fedi-remote-go" aria-label="ok">&rarr;</button><button type="button" class="fedi-remote-cancel" aria-label="x">&times;</button><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>';
     153      f.innerHTML = '<input type="text" autocomplete="off" spellcheck="false"><button type="submit" class="btn btn-primary fedi-remote-go" aria-label="ok">&rarr;</button><button type="button" class="fedi-remote-cancel" aria-label="x">&times;</button>';
    154154      var _inp = f.querySelector('input'); _inp.placeholder = b.getAttribute('data-fedi-ph') || 'mastodon.social';
    155155      try{ var _sv = localStorage.getItem('pcmsFediServer'); if(_sv) _inp.value = _sv; }catch(e){}
  • src/views/pages/post.ejs

    r781d613 rbca83f3  
    127127        f.className = 'fedi-remote-form';
    128128        f.dataset.uri = b.getAttribute('data-fedi-uri') || '';
    129         f.innerHTML = '<input type="text" name="fediserver" autocomplete="on" list="pcms-fedi-srv" spellcheck="false">'
     129        f.innerHTML = '<input type="text" autocomplete="off" spellcheck="false">'
    130130          + '<button type="submit" class="btn btn-primary fedi-remote-go" aria-label="ok">&rarr;</button>'
    131           + '<button type="button" class="fedi-remote-cancel" aria-label="x">&times;</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>';
     131          + '<button type="button" class="fedi-remote-cancel" aria-label="x">&times;</button>';
    133132        var _inp = f.querySelector('input');
    134133        _inp.placeholder = b.getAttribute('data-fedi-ph') || 'mastodon.social';
Note: See TracChangeset for help on using the changeset viewer.