0.1.3 • Published 1 year ago

btn.social v0.1.3

Weekly downloads
2
License
-
Repository
-
Last release
1 year ago

btn.social

UMD

<!-- Works with any HTML and CSS customization! -->
<link rel="stylesheet" href="theme.css"/>
<a href="https://login.btn.social/{APPID}/facebook" class="my-btn">
  <svg>...</svg> Login with Facebook
</a>

<!-- Load the SDK (1.5 kB) -->
<!-- Intercepts `<a href="https://login.btn.social/...">` clicks -->
<script async src="https://btn.social/v1/web.js"></script>
<script defer>
  // Manually trigger a pop-up window
  var paylaod = await btnsocial.popup('{APPID}', 'twitter', {
    // options
  });

  // Manually trigger a "_self" redirect
  btnsocial.redirect('{APPID}', 'github');
</script>

ESM

import { popup, redirect, listen } from 'btn.social';

// Intercept <a href="https://login.btn.social/..." clicks
var detach = listen({
  // options
});

// Manually trigger a pop-up window
var payload = popup('{APPID}', 'twitter', {
  // options
});

// Manually trigger a "_self" redirect
redirect('{APPID}', 'github');
0.1.2

1 year ago

0.1.1

1 year ago

0.1.3

1 year ago

0.1.0

1 year ago

0.0.0

3 years ago