diff options
author | Haakon Meland Eriksen <haakon.eriksen@far.no> | 2015-11-05 06:34:14 +0100 |
---|---|---|
committer | Haakon Meland Eriksen <haakon.eriksen@far.no> | 2015-11-05 06:34:14 +0100 |
commit | 07bd396837426fbe4cf3ecd189513d50a14081a1 (patch) | |
tree | 9ffe32f8b1eb1c6991c0827c7f182a509d12efe7 /mod/ffsapi.php | |
parent | 73bef17365b6ca1a92c78243eed5252ec4869f86 (diff) | |
parent | f7468ab473f49b9594095d29a50f8e921d0b15af (diff) | |
download | volse-hubzilla-07bd396837426fbe4cf3ecd189513d50a14081a1.tar.gz volse-hubzilla-07bd396837426fbe4cf3ecd189513d50a14081a1.tar.bz2 volse-hubzilla-07bd396837426fbe4cf3ecd189513d50a14081a1.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'mod/ffsapi.php')
-rw-r--r-- | mod/ffsapi.php | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/mod/ffsapi.php b/mod/ffsapi.php new file mode 100644 index 000000000..a75e60bcc --- /dev/null +++ b/mod/ffsapi.php @@ -0,0 +1,64 @@ +<?php + + +function ffsapi_content(&$a) { + +$baseurl = z_root(); +$name = sprintf( t('Social Provider on %1$s'), get_config('system','sitename')); +$description = t('Share content from Firefox to $Projectname'); +$author = 'Mike Macgirvin'; +$homepage = 'http://hubzilla.org'; +$activate = t('Activate the Firefox $Projectname provider'); + +$s = <<< EOT + +<script> + +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+"/rbmark?f=&url=%{url}&title=%{title}", + // icons should be 32x32 pixels + "markedIcon": baseurl+"/images/checkbox-checked-32.png", + "unmarkedIcon": baseurl+"/images/checkbox-unchecked-32.png", + + // 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); +} +</script> + +<button onclick="activate(this)" title="activate the demo provider">$activate</button> + +EOT; + +return $s; + +}
\ No newline at end of file |