Skip to content

Commit

Permalink
feat(firefox): initlize firefox addon package.json config and popup b…
Browse files Browse the repository at this point in the history
…utton/html.
  • Loading branch information
mrbigmouth committed Jun 14, 2016
1 parent fed6938 commit 06e6c31
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 0 deletions.
Binary file added firefoxAddon/data/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions firefoxAddon/data/popup.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Popup</title>
</head>
<body>
<div id="container"></div>
<script src='./dist/popup-bundle.js'></script>
</body>
</html>
21 changes: 21 additions & 0 deletions firefoxAddon/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
'use strict';
const {ActionButton} = require('sdk/ui/button/action');
const {Panel} = require('sdk/panel');
const tabs = require("sdk/tabs");

const panel = Panel({
contentURL: './popup.html',
width: 450,
height: 350
});

const button = ActionButton({
id: "clairvoyance-popup",
label: "Clairvoyance - 求職天眼通",
icon: './icon.png',
onClick() {
panel.show({
position: button
});
}
});
13 changes: 13 additions & 0 deletions firefoxAddon/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "clairvoyance",
"title": "Clairvoyance - 求職天眼通",
"description": "讓你能在各大人力銀行上留言討論職缺,減少求職的資訊不對稱",
"author": "mrbigmouth",
"contributors": ["clver"],
"main": "index.js",
"engines": {
"firefox": ">=38.0a1"
},
"license": "MIT",
"version": "1.9.0"
}

0 comments on commit 06e6c31

Please sign in to comment.