Socket
Book a DemoInstallSign in
Socket

btn.social

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

btn.social

### UMD

latest
npmnpm
Version
0.1.3
Version published
Maintainers
1
Created
Source

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');

FAQs

Package last updated on 14 Apr 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts