From f4a9529968fedb65289d49ec0901739df17df698 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Wed, 4 Nov 2015 17:47:24 -0800 Subject: Firefox Share API provider interface (first cut, only has share ability) --- mod/ffsapi.php | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 mod/ffsapi.php (limited to 'mod/ffsapi.php') diff --git a/mod/ffsapi.php b/mod/ffsapi.php new file mode 100644 index 000000000..15cc8365f --- /dev/null +++ b/mod/ffsapi.php @@ -0,0 +1,64 @@ + + +var baseurl = '$baseurl'; + +var data = { + "origin": baseurl, + // currently required + "name": '$name', + "iconURL": baseurl+"/images/hz-16.png", + "icon32URL": baseurl+"/images/hz-32.png", + "icon64URL": baseurl+"/images/hz-64.png", + + // at least one of these must be defined + // "workerURL": baseurl+"/worker.js", + // "sidebarURL": baseurl+"/sidebar.htm", + "shareURL": baseurl+"/rpost?f=&url=%{url}", + + // status buttons are scheduled for Firefox 26 or 27 + //"statusURL": baseurl+"/statusPanel.html", + + // social bookmarks are available in Firefox 26 + //"markURL": baseurl+"/mark.html?url=%{url}", + // icons should be 32x32 pixels + //"markedIcon": baseurl+"/unchecked.jpg", + //"unmarkedIcon": baseurl+"/checked.jpg", + + // should be available for display purposes + "description": '$description', + "author": '$author', + "homepageURL": '$homepage', + + // optional + "version": "1.0" +} + +function activate(node) { + var event = new CustomEvent("ActivateSocialFeature"); + var jdata = JSON.stringify(data); + node.setAttribute("data-service", JSON.stringify(data)); + node.dispatchEvent(event); +} + + + + +EOT; + +return $s; + +} \ No newline at end of file -- cgit v1.2.3