PeerTube: record Dex login, sign-up link and oidc-cnr settings
Log in redirects to the single external auth (Dex), custom JS adds a Sign up link to www.eom.dev/members, and a post-deploy task sets the oidc-cnr claims Dex sends (groups, preferred_username, name). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
1af90faddc
commit
2cc66deb99
@@ -0,0 +1,11 @@
|
||||
/* eom.dev: sign-in goes to Dex; sign-up goes through the membership site */
|
||||
(function(){var U='https://www.eom.dev/members';
|
||||
var LOGIN='a[href$="/login"],a[href*="/plugins/oidc-cnr/"][href*="/auth/"]';
|
||||
function fix(){
|
||||
document.querySelectorAll('a[href$="/signup"],a[href*="/signup?"]').forEach(function(a){a.href=U;a.addEventListener('click',function(e){e.stopImmediatePropagation();},true);});
|
||||
document.querySelectorAll(LOGIN).forEach(function(a){
|
||||
if(a.dataset.eomSignup||a.closest('.eom-signup'))return; a.dataset.eomSignup='1';
|
||||
var s=a.cloneNode(false); s.removeAttribute('data-eom-signup'); s.href=U; s.textContent='Sign up'; s.className=(a.className||'')+' eom-signup'; s.style.marginLeft='0.5rem';
|
||||
a.insertAdjacentElement('afterend',s);});
|
||||
}
|
||||
new MutationObserver(fix).observe(document.documentElement,{childList:true,subtree:true}); fix();})();
|
||||
Reference in New Issue
Block a user