This repository has been archived by the owner on Oct 14, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 176
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
jiacai2050
committed
Sep 12, 2020
1 parent
69ef988
commit cfb2f67
Showing
33 changed files
with
299 additions
and
164 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
var DarkReader = { | ||
enable: function(){}, | ||
disable: function(){}, | ||
auto: function(){}, | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
|
||
cd "$(cd `dirname $0`;pwd)" | ||
|
||
set -x | ||
|
||
rm resources/release/ui/option.js \ | ||
resources/release/ui/popup.js \ | ||
resources/release/background/main.js | ||
|
||
|
||
lein with-profile release do clean, cljsbuild once option | ||
lein with-profile release do clean, cljsbuild once background | ||
lein with-profile release do clean, cljsbuild once popup | ||
# clean compiled js before packaging | ||
lein with-profile release clean | ||
|
||
cd resources/release | ||
zip -x *.DS_Store -r ~/gooreplacer_`date +%s`.zip * |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,101 +1,115 @@ | ||
(defproject gooreplacer "3.10.0" | ||
:description "Modify, block URLs & Headers" | ||
:url "https://github.com/jiacai2050/gooreplacer" | ||
:license {:name "MIT" | ||
:url "http://liujiacai.net/license/MIT.html?year=2015"} | ||
:dependencies [[org.clojure/clojure "1.10.0"] | ||
[org.clojure/clojurescript "1.10.597"] | ||
[figwheel-sidecar "0.5.14"] | ||
[org.clojure/core.match "0.3.0-alpha5"] | ||
[org.clojure/data.json "0.2.7"] | ||
[alandipert/storage-atom "2.0.1"] | ||
:description "Modify, block URLs & Headers" | ||
:url "https://github.com/jiacai2050/gooreplacer" | ||
:license {:name "MIT" | ||
:url "http://liujiacai.net/license/MIT.html?year=2015"} | ||
:dependencies [[org.clojure/clojure "1.10.1"] | ||
[org.clojure/clojurescript "1.10.773"] | ||
[figwheel-sidecar "0.5.14"] | ||
[org.clojure/core.match "1.0.0"] | ||
[org.clojure/data.json "1.0.0"] | ||
[alandipert/storage-atom "2.0.1"] | ||
|
||
;; ui | ||
[antizer "0.3.0"] | ||
[cljs-http "0.1.43"] | ||
[org.clojure/core.async "0.3.443"] | ||
[reagent "0.8.1"]] | ||
:plugins [[lein-figwheel "0.5.14"] | ||
[lein-cljsbuild "1.1.7"] | ||
[lein-doo "0.1.8"]] | ||
:profiles { | ||
;; https://docs.cider.mx/cider/0.23/basics/clojurescript.html#_piggieback | ||
;; cider will jack in piggieback automatically | ||
;; :dev {:repl-options {:nrepl-middleware [cemerick.piggieback/wrap-cljs-repl]}} | ||
:dev-option {:clean-targets ^{:protect false} [:target-path "resources/dev/option/js"] | ||
:cljsbuild {:builds [{:id "dev" | ||
:figwheel true | ||
:source-paths ["src"] | ||
:compiler {:output-to "resources/dev/option/js/main.js" | ||
:source-map true | ||
:asset-path "js" | ||
:output-dir "resources/dev/option/js" | ||
:optimizations :none | ||
:main gooreplacer.option.core | ||
:verbose true}}]} | ||
:figwheel {:server-port 8080 | ||
:http-server-root "dev/option" | ||
:css-dirs ["resources/dev/option/css"] | ||
:server-logfile ".figwheel_option.log" | ||
:repl true}} | ||
:dev-popup {:clean-targets ^{:protect false} [:target-path "resources/dev/popup/js"] | ||
;; ui | ||
[antizer "0.3.0"] | ||
[cljs-http "0.1.46"] | ||
[org.clojure/core.async "1.3.610"] | ||
[reagent "0.10.0"]] | ||
:plugins [[lein-figwheel "0.5.14"] | ||
[lein-cljsbuild "1.1.8"] | ||
[lein-doo "0.1.8"]] | ||
:profiles { | ||
;; https://docs.cider.mx/cider/0.23/basics/clojurescript.html#_piggieback | ||
;; cider will jack in piggieback automatically | ||
;; :dev {:repl-options {:nrepl-middleware [cemerick.piggieback/wrap-cljs-repl]}} | ||
:dev-option {:clean-targets ^{:protect false} [:target-path "resources/dev/ui/compiled-js/option"] | ||
:cljsbuild {:builds [{:id "dev" | ||
:figwheel true | ||
:compiler {:output-to "resources/dev/popup/js/main.js" | ||
:source-paths ["src"] | ||
:compiler {:output-dir "resources/dev/ui/compiled-js/option" | ||
:source-map true | ||
:asset-path "js" | ||
:output-dir "resources/dev/popup/js" | ||
:output-to "resources/dev/ui/js/option.js" | ||
:optimizations :none | ||
:main gooreplacer.popup.core | ||
:main gooreplacer.option.core | ||
:verbose true}}]} | ||
:figwheel {:server-port 8081 | ||
:http-server-root "dev/option" | ||
:css-dirs ["resources/dev/option/css"] | ||
:server-logfile ".figwheel_popup.log" | ||
:figwheel {:server-port 8080 | ||
:http-server-root "dev/ui" | ||
:css-dirs ["resources/dev/ui/css"] | ||
:server-logfile ".figwheel_option.log" | ||
:repl true}} | ||
:dev-bg {:clean-targets ^{:protect false} [:target-path "resources/dev/background/js"] | ||
:figwheel {:server-port 8089 | ||
:http-server-root "dev/background" | ||
:server-logfile ".figwheel_bg.log" | ||
:repl true} | ||
:cljsbuild {:builds [{:id "dev" | ||
:dev-popup {:clean-targets ^{:protect false} [:target-path "resources/dev/ui/compiled-js/popup"] | ||
:cljsbuild {:builds [{:id "dev" | ||
:figwheel true | ||
:source-paths ["src"] | ||
:compiler {:output-dir "resources/dev/ui/compiled-js/popup" | ||
:source-map true | ||
:asset-path "js" | ||
:output-to "resources/dev/ui/js/pop.js" | ||
:optimizations :none | ||
:main gooreplacer.popup | ||
:verbose true}}]} | ||
:figwheel {:server-port 8090 | ||
:http-server-root "dev/ui" | ||
:css-dirs ["resources/dev/ui/css"] | ||
:server-logfile ".figwheel_popup.log" | ||
:repl true}} | ||
:dev-bg {:clean-targets ^{:protect false} [:target-path "resources/dev/background/js"] | ||
:figwheel {:server-port 8095 | ||
:http-server-root "dev/background" | ||
:server-logfile ".figwheel_bg.log" | ||
:repl true} | ||
:cljsbuild {:builds [{:id "dev" | ||
:source-paths ["src"] | ||
:figwheel true | ||
:compiler {:output-to "resources/dev/background/js/main.js" | ||
:source-map true | ||
:output-dir "resources/dev/background/js" | ||
:asset-path "js" | ||
:main gooreplacer.background | ||
:optimizations :none | ||
:verbose true}}]}} | ||
:release {:clean-targets ^{:protect false} [:target-path | ||
"resources/release/ui/option-js" | ||
"resources/release/ui/popup-js" | ||
"resources/release/background/js"] | ||
:cljsbuild {:builds [{:id "option" | ||
:source-paths ["src"] | ||
:figwheel true | ||
:compiler {:output-to "resources/dev/background/js/main.js" | ||
:source-map true | ||
:output-dir "resources/dev/background/js" | ||
:asset-path "js" | ||
:main gooreplacer.background | ||
:optimizations :none | ||
:verbose true}}]}} | ||
:release {:clean-targets ^{:protect false} [:target-path | ||
"resources/release/option/js" | ||
"resources/release/background/js"] | ||
:cljsbuild {:builds [{:id "option" | ||
:compiler {:output-to "resources/release/option/main.js" | ||
:output-dir "resources/release/option/js" | ||
:externs ["externs/chrome_extensions.js" "externs/chrome.js"] | ||
:optimizations :advanced | ||
:main gooreplacer.option.core}} | ||
{:id "background" | ||
:compiler {:output-to "resources/release/background/main.js" | ||
:output-dir "resources/release/background/js" | ||
:externs ["externs/chrome_extensions.js" "externs/chrome.js"] | ||
:optimizations :advanced | ||
:main gooreplacer.background}}]}} | ||
:test {:cljsbuild {:builds [{:id "test" | ||
:compiler {:output-to "out/main.js" | ||
:main gooreplacer.runner | ||
:optimizations :none}}]} | ||
:doo {:build "test"}}} | ||
:compiler {:output-to "resources/release/ui/option.js" | ||
:output-dir "resources/release/ui/option-js" | ||
:externs ["externs/chrome_extensions.js" "externs/chrome.js" "externs/darkreader.js"] | ||
:optimizations :advanced | ||
:main gooreplacer.option.core}} | ||
{:id "popup" | ||
:source-paths ["src"] | ||
:compiler {:output-to "resources/release/ui/popup.js" | ||
:output-dir "resources/release/ui/popup-js" | ||
:externs ["externs/chrome_extensions.js" "externs/chrome.js" "externs/darkreader.js"] | ||
:optimizations :advanced | ||
:main gooreplacer.popup}} | ||
{:id "background" | ||
:source-paths ["src"] | ||
:compiler {:output-to "resources/release/background/main.js" | ||
:output-dir "resources/release/background/js" | ||
:externs ["externs/chrome_extensions.js" "externs/chrome.js"] | ||
:optimizations :advanced | ||
:main gooreplacer.background}}]}} | ||
:test {:cljsbuild {:builds [{:id "test" | ||
:compiler {:output-to "out/main.js" | ||
:main gooreplacer.runner | ||
:optimizations :none}}]} | ||
:doo {:build "test"}}} | ||
|
||
:aliases {"option" ["with-profile" "dev-option" "do" | ||
["clean"] | ||
["figwheel" "dev"]] | ||
"bg" ["with-profile" "dev-bg" "do" | ||
["clean"] | ||
["figwheel" "dev"]] | ||
"test-and-watch" ["with-profile" "test" "do" | ||
["clean"] | ||
;; First install phantom | ||
["doo" "phantom"]]}) | ||
:aliases {"option" ["with-profile" "dev-option" "do" | ||
["clean"] | ||
["figwheel" "dev"]] | ||
"popup"["with-profile" "dev-popup" "do" | ||
["clean"] | ||
["figwheel" "dev"]] | ||
"bg" ["with-profile" "dev-bg" "do" | ||
["clean"] | ||
["figwheel" "dev"]] | ||
"test-and-watch" ["with-profile" "test" "do" | ||
["clean"] | ||
;; First install phantom | ||
["doo" "phantom"]]}) |
This file was deleted.
Oops, something went wrong.
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
goog.require("figwheel.connect.build_dev"); | ||
goog.require("gooreplacer.core"); | ||
goog.require("gooreplacer.background"); |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
goog.require("figwheel.connect.build_dev"); | ||
goog.require("gooreplacer.popup"); |
12 changes: 6 additions & 6 deletions
12
cljs-src/resources/dev/option/index.html → cljs-src/resources/dev/ui/option.html
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<link rel="shortcut icon" href="img/gooreplacer.ico" type="image/x-icon"> | ||
<link rel="icon" href="img/gooreplacer.ico" type="image/x-icon"> | ||
<link rel="shortcut icon" href="img/32.png" type="image/x-icon"> | ||
<link rel="icon" href="img/32.png" type="image/x-icon"> | ||
<meta charset="utf-8"> | ||
<!-- https://github.com/facebook/react/tree/master/packages/react-devtools#usage-with-react-dom --> | ||
<script src="http://localhost:8097"></script> | ||
<script type="text/javascript" src="js/goog/base.js"></script> | ||
<script type="text/javascript" src="js/cljs_deps.js"></script> | ||
<link rel="stylesheet" type="text/css" href="css/main.css"> | ||
<script type="text/javascript" src="compiled-js/option/goog/base.js"></script> | ||
<script type="text/javascript" src="compiled-js/option/cljs_deps.js"></script> | ||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/antd.min.css"> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/darkreader.min.js"></script> | ||
<meta charset="UTF-8"> | ||
<title>Gooreplacer</title> | ||
</head> | ||
<body> | ||
<div id="app"></div> | ||
<script type="text/javascript" src="init.js"></script> | ||
<script type="text/javascript" src="init-option.js"></script> | ||
<input type="file" id="gsonChooser" accept=".gson" style="display:none" /> | ||
</body> | ||
</html> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<link rel="shortcut icon" href="img/32.png" type="image/x-icon"> | ||
<link rel="icon" href="img/32.png" type="image/x-icon"> | ||
<meta charset="utf-8"> | ||
<!-- https://github.com/facebook/react/tree/master/packages/react-devtools#usage-with-react-dom --> | ||
<script src="http://localhost:8097"></script> | ||
<script type="text/javascript" src="compiled-js/popup/goog/base.js"></script> | ||
<script type="text/javascript" src="compiled-js/popup/cljs_deps.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/darkreader.min.js"></script> | ||
<link rel="stylesheet" type="text/css" href="css/main.css"> | ||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/antd.min.css"> | ||
<meta charset="UTF-8"> | ||
<title>Gooreplacer</title> | ||
</head> | ||
<body> | ||
<div id="popup-div"></div> | ||
<script type="text/javascript" src="init-popup.js"></script> | ||
</body> | ||
</html> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
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
File renamed without changes.
File renamed without changes.
Oops, something went wrong.