browser/base/content/test/social/social_activate.html
author Shane Caraveo <scaraveo@mozilla.com>
Wed, 30 Apr 2014 12:08:23 -0700
changeset 192243 315f0fda04709d3f1b78161715b92203e8fb241e
parent 158400 58a67d0f50bcde0e65e1c5d7f5d07422233a41d2
child 238559 dac7ee29d0f82ee6d2d69881d3b4cb7a1c604fb9
permissions -rw-r--r--
Bug 983481 - Open a post activation landing page. r=markh, a=lsblakk

<html>
<head>
	<title>Activation test</title>
</head>
<script>
// icons from http://findicons.com/icon/158311/firefox?id=356182 by ipapun
var data = {
  // currently required
  "name": "Demo Social Service",
  "iconURL": "chrome://branding/content/icon16.png",
  "icon32URL": "chrome://branding/content/favicon32.png",
  "icon64URL": "chrome://branding/content/icon64.png",

  // at least one of these must be defined
  "sidebarURL": "/browser/browser/base/content/test/social/social_sidebar.html",
  "workerURL": "/browser/browser/base/content/test/social/social_worker.js",
  "statusURL": "/browser/browser/base/content/test/social/social_panel.html",
  "postActivationURL": "/browser/browser/base/content/test/social/social_postActivation.html",

  // should be available for display purposes
  "description": "A short paragraph about this provider",
  "author": "Shane Caraveo, Mozilla",

  // optional
  "version": 1
}

function activate(node) {
  node.setAttribute("data-service", JSON.stringify(data));
  var event = new CustomEvent("ActivateSocialFeature");
  node.dispatchEvent(event);
}

function oldActivate(node) {
  var event = new CustomEvent("ActivateSocialFeature");
  document.dispatchEvent(event);
}
</script>
<body>

nothing to see here

<button id="activation-old" onclick="oldActivate(this)">Activate The Demo Provider</button>
<button id="activation" onclick="activate(this)">Activate The Demo Provider</button>

</body>
</html>