Commit ca63ab6a authored by Ricardo J. Mendez's avatar Ricardo J. Mendez
parent 6dee5447
(defproject tabler "0.1.0-SNAPSHOT"
(defproject booklet-chrome "0.1.0-SNAPSHOT"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.7.0"]
......@@ -12,7 +12,7 @@
[lein-chromebuild "0.3.0"]]
:cljsbuild {:builds {:main
{:source-paths ["src"]
:compiler {:output-to "target/unpacked/tabler.js"
:compiler {:output-to "target/unpacked/booklet.js"
:output-dir "target/js"
:optimizations :whitespace
:pretty-print true}}}}
......
......@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>Tabler</title>
<title>Booklet</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<link rel="shortcut icon" href="/favicon.png">
......@@ -63,7 +63,7 @@
<script type="text/javascript" src="/tabler.js"></script>
<script type="text/javascript" src="/booklet.js"></script>
<script type="text/javascript" src="/core.js"></script>
......
tabler.background.init();
booklet.background.init();
tabler.core.init();
booklet.core.init();
tabler.handler.init();
\ No newline at end of file
booklet.handler.init();
\ No newline at end of file
{
"name": "tabler",
"name": "Booklet",
"version": "0.1",
"browser_action": {
"default_title": "Show the popup",
"scripts": ["tabler.js", "handler.js"],
"scripts": ["booklet.js", "handler.js"],
"default_icon": {
"19": "icon19.png",
"38": "icon38.png"
......@@ -19,7 +19,7 @@
],
"background": {
"scripts": [
"tabler.js",
"booklet.js",
"background.js",
"handler.js"
],
......
(ns tabler.background
(ns booklet.background
(:require [cljs.core.async :refer [>! <!]]
[khroma.log :as console]
[khroma.runtime :as runtime]
......
(ns tabler.core
(ns booklet.core
(:require [cljs.core.async :refer [>! <!]]
[khroma.runtime :as runtime]
[khroma.log :as console]
......@@ -101,9 +101,10 @@
[:td (:url tab)]]))
(defn tab-list []
(let [tabs (subscribe [:tabs])]
(let [tabs (reaction (filter-tabs @(subscribe [:tabs])))]
(fn []
[:div
[:div {:class "page-header"} [:h2 "Current tabs"]]
[:table {:class "table table-striped table-hover"}
[:thead
[:tr
......@@ -140,7 +141,7 @@
(defn init []
(console/log "Initialized tabler.core")
(console/log "Initialized booklet.core")
(go (let [c (<! (windows/get-current))]
(dispatch [:initialize (:tabs c)])))
(let [bg (runtime/connect)]
......
(ns tabler.handler
(ns booklet.handler
(:require [khroma.log :as console]
[khroma.browser :as browser]
[khroma.tabs :as tabs]
......@@ -8,7 +8,7 @@
(:require-macros [cljs.core.async.macros :refer [go]]))
(defn init []
(console/log "tabler.handler.init")
(console/log "booklet.handler.init")
(let [conns (browser/on-clicked)]
(go (while true
(let [tab (<! conns)]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment