Skip to content
This repository has been archived by the owner on Dec 27, 2023. It is now read-only.

Posting Application

Sean McGregor edited this page Jan 20, 2013 · 6 revisions

Posting Application

Status: testing
This specification is being tested in the Firefox and Chrome extensions.

A posting application is a web application that generates a new Privly URL for posting to the host page. Generally this involves opening a Privly application that will send ciphertext to a content server, which then returns a content URL for pasting on the host page.

Please note the distinction between posting a new link, and viewing content already on the host page. When you post a new link, the host page receives a text string of the Privly URL. Future visits to the host page will result in the submitted URL being injected into place to view the content.

Current posting applications are generally developed for specific Injectable Application, but any web application could potentially receive Privly URLs from a content server.

Process

A user will be able to specify any posting application by giving the extension the application's address. The extension will come with several pre-packaged posting applications which are served directly from the extensions. The high-level process for posting a new Privly-type link is:

  1. The user selects the form element they want to post the link to (this often through a right click of the mouse)
  2. The extension opens a web application for the current posting application and messages the current contents of the host page's form element.
  3. When interaction with the posting application completes, it fires a privlyUrl event
  4. The extension places the URL into the host page's form element
  5. The extension closes the posting application's window

Code Samples

Sending the URL to the Extension

When the posting application creates a new link, the application will fire an event containing the URL for the extension to add to the host page.

Example Posting Application Event:

var url = "" //the Privly formatted URL
var urlEventElement = document.createElement("privlyEventSender");  
urlEventElement.setAttribute("privlyUrl", url);  
document.documentElement.appendChild(urlEventElement);  
var evt = document.createEvent("privlyEvents");  
evt.initEvent("PrivlyUrlEvent", true, false);  
urlEventElement.dispatchEvent(evt);

See Also: List of Current Injectable Applications

Clone this wiki locally