gecko/browser/base/content/test/social/social_activate.html

40 lines
1.0 KiB
HTML
Raw Normal View History

<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
"workerURL": "/browser/browser/base/content/test/social/social_sidebar.html",
"sidebarURL": "/browser/browser/base/content/test/social/social_worker.js",
// should be available for display purposes
"description": "A short paragraph about this provider",
"author": "Shane Caraveo, Mozilla",
// optional
"version": "1.0"
}
function activate(node) {
node.setAttribute("data-service", JSON.stringify(data));
var event = new CustomEvent("ActivateSocialFeature");
node.dispatchEvent(event);
}
</script>
<body>
nothing to see here
<button id="activation" onclick="activate(this)">Activate The Demo Provider</button>
</body>
</html>