aboutsummaryrefslogtreecommitdiff
path: root/ext/bg
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2017-03-01 20:49:46 -0800
committerAlex Yatskov <alex@foosoft.net>2017-03-01 20:49:46 -0800
commit95cf7a784f2212d21f9808d4cde43476b349e89e (patch)
tree693d969458eeebbe55bd85ad3a2d3fa8e37bd186 /ext/bg
parent4c0ed9c2922dbd82cae8e844fa33bbc3d96a6cf4 (diff)
wip on browser action button
Diffstat (limited to 'ext/bg')
-rw-r--r--ext/bg/js/yomichan.js7
-rw-r--r--ext/bg/popup.html34
2 files changed, 34 insertions, 7 deletions
diff --git a/ext/bg/js/yomichan.js b/ext/bg/js/yomichan.js
index b1bf710f..d7d2317f 100644
--- a/ext/bg/js/yomichan.js
+++ b/ext/bg/js/yomichan.js
@@ -29,7 +29,6 @@ class Yomichan {
chrome.runtime.onMessage.addListener(this.onMessage.bind(this));
chrome.runtime.onInstalled.addListener(this.onInstalled.bind(this));
- chrome.browserAction.onClicked.addListener(e => chrome.runtime.openOptionsPage());
this.translator.prepare().then(optionsLoad).then(this.setOptions.bind(this));
}
@@ -51,12 +50,6 @@ class Yomichan {
return true;
}
- // setEnabled(enabled) {
- // this.enabled = enabled;
- // this.tabInvokeAll('setEnabled', this.enabled);
- // chrome.browserAction.setBadgeText({text: enabled ? '' : 'off'});
- // }
-
setOptions(options) {
this.options = options;
diff --git a/ext/bg/popup.html b/ext/bg/popup.html
new file mode 100644
index 00000000..ad66c374
--- /dev/null
+++ b/ext/bg/popup.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="UTF-8">
+ <title>Welcome to Yomichan!</title>
+ <link rel="stylesheet" type="text/css" href="../lib/bootstrap-3.3.7-dist/css/bootstrap.min.css">
+ <link rel="stylesheet" type="text/css" href="../lib/bootstrap-3.3.7-dist/css/bootstrap-theme.min.css">
+ <link rel="stylesheet" type="text/css" href="../lib/bootstrap-toggle/bootstrap-toggle.min.css">
+ <style type="text/css">
+ body {
+ padding: 10px;
+ text-align: center;
+ }
+
+ .btn-group {
+ display: flex;
+ }
+ </style>
+ </head>
+ <body>
+ <p>
+ <input type="checkbox" data-toggle="toggle">
+ </p>
+ <p>
+ <div class="btn-group" style="white-space: nowrap">
+ <button type="button" class="btn btn-default btn-xs glyphicon glyphicon-cog"></button>
+ <button type="button" class="btn btn-default btn-xs glyphicon glyphicon-search"></button>
+ <button type="button" class="btn btn-default btn-xs glyphicon glyphicon-question-sign"></button>
+ </div>
+ </p>
+ <script src="../lib/jquery-3.1.1.min.js"></script>
+ <script src="../lib/bootstrap-toggle/bootstrap-toggle.min.js"></script>
+ </body>
+</html>