Skip to content
This repository has been archived by the owner on Aug 25, 2020. It is now read-only.

voxpelli/indie-action-component

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a proof of concept of a Web Component for the IndieWeb WebActions tag: <indie-action>

This is built using Mozilla's X-Tags library

The component can be found in src/main.js

A copy of X-Tags itself can be found in demo/x-tag-components.js, but should preferably be downloaded from X-Tags instead.

To configure your reply endpoint for use with this

First do navigator.registerProtocolHandler('web+action', '/?url=%s', 'IndieWeb') somewhere to register your site.

Then on the site registered as '/?url=%s' add your configuration like:

if (window.parent !== window) {
  window.parent.postMessage(JSON.stringify({
    // The config of your reply endpoint
    reply: 'https://example.com/reply?u={url}'
  }), '*');
}

That code will send the configuration to the parent window when its loaded using an iframe. The iframe will point to web+action:load which will auto-resolve to your site when loaded.

Live on

About

Web Component for WebActions: <indie-action>

Resources

Security policy

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published