This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var CLOSURE_UNCOMPILED_DEFINES = {"goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING": true}; | |
var CLOSURE_NO_DEPS = true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var requireFile = function (src) { | |
var script = document.createElement("script"); | |
script.src = chrome.extension.getURL(src); | |
script.defer = false; | |
script.async = false; | |
document.body.appendChild(script); | |
}; | |
requireFile("util/overrides-simple.js"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"manifest_version": 2, | |
"name": "Figwheel Chrome Content Script Demo", | |
"version": "1", | |
"description": "", | |
"content_scripts": [ | |
{ | |
"matches": ["*://clojure.org/*"], | |
"js": [ | |
"content-script.js" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var resourceURL = function (src) { | |
return chrome.extension.getURL("js/goog/" + src); | |
}; | |
var loadSync = function(src) { | |
var xhr = new XMLHttpRequest(); | |
xhr.open("GET", src, false); | |
xhr.send(null); | |
return xhr.responseText; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"manifest_version": 2, | |
"name": "Figwheel Chrome Content Script Demo", | |
"version": "1", | |
"description": "", | |
"content_scripts": [ | |
{ | |
"matches": ["*://clojure.org/*"], | |
"js": [ | |
"util/overrides.js", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns user | |
(:require [figwheel-sidecar.repl-api :as ra])) | |
(def figwheel-config | |
{:figwheel-options {:server-port 3449} | |
;; builds to focus on | |
:build-ids ["content-script"] | |
;; load build configs from project file | |
:all-builds (figwheel-sidecar.system/get-project-builds)}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defproject chrome-content-script "0.1.0-SNAPSHOT" | |
:description "FIXME: write description" | |
:url "http://example.com/FIXME" | |
:license {:name "Eclipse Public License" | |
:url "http://www.eclipse.org/legal/epl-v10.html"} | |
:dependencies [[org.clojure/clojure "1.8.0"] | |
[org.clojure/clojurescript "1.8.40" :scope "provided"] | |
[figwheel-sidecar "0.5.2"]] | |
:source-paths ["src"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
generate-spaces("n" 0, "xs" 20px, "s" 40px, "m" 120px, "l" 100px, "xl" 240px); | |
// examples: | |
// pan = padding all none | |
// mvxs = margin vertical x-small |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defmulti render :type) | |
(defn render-off-screen [f w h] | |
(let [canvas (doto (.createElement js/document "canvas") | |
(aset "width" w) (aset "height" h)) | |
ctx (.getContext canvas "2d")] | |
(f ctx) | |
canvas)) | |
(defn clear-canvas [canvas] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns smgui.dirscan | |
(:require-macros [cljs.core.async.macros :refer [go go-loop]] | |
[swannodette.utils.macros :refer [dochan <? go-try]]) | |
(:require [cljs.core.async :refer [chan <! >! put! close!]] | |
[swannodette.utils.reactive :as r])) | |
(def nodepath (js/require "path")) | |
(def dir-separator (.-sep nodepath)) | |
(def fs (js/require "fs")) | |
(def test-path "/Volumes/WilkerWD/Downloads/Torrent") |