Add popup script
This commit is contained in:
parent
c592c38f59
commit
20ac362a41
@ -10,7 +10,11 @@
|
||||
"128": "icons/icon128.png"
|
||||
},
|
||||
"background": {
|
||||
"scripts": ["js/browser-polyfill.min.js", "js/generated/main.js"]
|
||||
"scripts": [
|
||||
"js/browser-polyfill.min.js",
|
||||
"js/generated/out/cljs_base.js",
|
||||
"js/generated/background.js"
|
||||
]
|
||||
},
|
||||
"browser_action": {
|
||||
"default_icon": "icons/icon48.png",
|
||||
|
11
project.clj
11
project.clj
@ -12,6 +12,11 @@
|
||||
:cljsbuild {:builds [{:source-paths ["src"]
|
||||
:compiler {:optimizations :simple
|
||||
:pretty-print true
|
||||
:output-to "ext/js/generated/main.js"
|
||||
:source-map "ext/js/generated/main.js.map"
|
||||
:output-dir "ext/js/generated/out"}}]})
|
||||
:source-map true
|
||||
:output-dir "ext/js/generated/out"
|
||||
:modules {:background
|
||||
{:output-to "ext/js/generated/background.js"
|
||||
:entries #{"looped-in.background"}}
|
||||
:popup
|
||||
{:output-to "ext/js/generated/popup.js"
|
||||
:entries #{"looped-in.popup"}}}}}]})
|
||||
|
@ -1,4 +1,4 @@
|
||||
(ns looped-in.main
|
||||
(ns looped-in.background
|
||||
(:require [clojure.core.match :refer [match]]
|
||||
[cljs.core.async :refer [go go-loop chan close! >! <!]]
|
||||
[ajax.core :refer [GET]]
|
||||
@ -103,5 +103,7 @@
|
||||
;; 2. Fetch HN hits
|
||||
;; 3. Filter and sort hits
|
||||
;; 4. Count comments, update badge
|
||||
;; 5. Fetch item details
|
||||
;; 6. Construct popup (or sidebar?) html
|
||||
;; 5. When the popup is opened:
|
||||
;; 6. Fetch items based on the id (this will have to come
|
||||
;; from the background script to avoid repeating the request)
|
||||
;; 7. Render the popup
|
4
src/looped_in/popup.cljs
Normal file
4
src/looped_in/popup.cljs
Normal file
@ -0,0 +1,4 @@
|
||||
(ns looped-in.popup
|
||||
(:require [looped-in.logging :as log]))
|
||||
|
||||
(log/info "Hello from the popup script!")
|
Loading…
Reference in New Issue
Block a user