From b97ecaf81fd18e16e8c805c87f7ed10f0893d4e4 Mon Sep 17 00:00:00 2001 From: tim h Date: Thu, 29 Dec 2022 21:23:07 -0600 Subject: [PATCH 01/11] updates readme to add mention of browser extension incompatibilities (!?!?!?) --- README.md | 5 +++++ pages/configuration.html | 22 +++++++++++----------- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index a16f2ac..a365f60 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,11 @@ A1111 webUI must be launched with the `--api` flag enabled, and the `--cors-allo **_NOTE: the commandline flag `--gradio-debug` disables custom API routes and completely breaks openOutpaint. please remove it from your COMMANDLINE_ARGS before running openOutpaint._** +### surprising incompatibilities + +- [microsoft editor extension for chrome/edge seems to disable the overmask slider]() +- [duckduckgo privacy extension for firefox breaks outpainting, resulting in pure black output](https://github.com/zero01101/openOutpaint-webUI-extension/issues/3#issuecomment-1367694000) - add an exception for your openOutpaint host (likely localhost or 127.0.0.1) + ### quickstart speedrun 1. edit your `cors-allow-origins` to include https://zero01101.github.io and run webUI diff --git a/pages/configuration.html b/pages/configuration.html index 313a527..90023a0 100644 --- a/pages/configuration.html +++ b/pages/configuration.html @@ -4,22 +4,22 @@ openOutpaint 🐠 - - + + - - + + - + - - - + + + - - - + + + From 0afc59da740dddf7d1101353db186e24876b15c3 Mon Sep 17 00:00:00 2001 From: zero01101 Date: Fri, 30 Dec 2022 03:29:20 +0000 Subject: [PATCH 02/11] Fixed resource hashes --- pages/configuration.html | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/pages/configuration.html b/pages/configuration.html index 90023a0..313a527 100644 --- a/pages/configuration.html +++ b/pages/configuration.html @@ -4,22 +4,22 @@ openOutpaint 🐠 - - + + - - + + - + - - - + + + - - - + + + From 7e4f6523b8f8569b644d5597112a0fa27d5221d7 Mon Sep 17 00:00:00 2001 From: tim h Date: Thu, 29 Dec 2022 21:56:36 -0600 Subject: [PATCH 03/11] update incompatibilities broken link --- .devtools/updatehashes.sh | 7 +++++-- README.md | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.devtools/updatehashes.sh b/.devtools/updatehashes.sh index 372b37f..c18f560 100644 --- a/.devtools/updatehashes.sh +++ b/.devtools/updatehashes.sh @@ -94,16 +94,18 @@ do done # Actual file processing -for htmlfile in $(find -type f -name \*.html) +for htmlfile in $(find -type f -name \*.html -not -path "./node_modules/*") do echo -e "${BIBlue}[info] Processing '${htmlfile}' for cache busting...${Color_Off}" - for resourcefile in $(find -type f -regex '.*\.css\|.*\.js' | sed 's/\.\///g') + for resourcefile in $(find -type f -regex '.*\.css\|.*\.js' -not -path "./node_modules/*" | sed 's/\.\///g') do + echo "inside loop 1: $resourcefile" # Check if resource is used in html file resourceusage=$(grep -i "$resourcefile" "$htmlfile") if [ $? -eq 0 ] then + echo "inside loop 2: $resourcefile $htmlfile" # This is just for cache busting... # If 7 first characters of SHA1 is okay for git, it should be more than enough for us hash="$(sha1sum $resourcefile | cut -d' ' -f1 | head -c 7)" @@ -111,6 +113,7 @@ do # Check if resource hash is already correct if ! echo "$resourceusage" | grep -i "=$hash\"" > /dev/null then + echo "inside loop 3: $resourcefile" escaped=$(echo $resourcefile | sed 's/\//\\\//g' | sed 's/\./\\./g') sed -Ei "s/${escaped}(\?v=[a-z0-9]+)?/${escaped}?v=${hash}/g" "$htmlfile" diff --git a/README.md b/README.md index a365f60..6e72579 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ A1111 webUI must be launched with the `--api` flag enabled, and the `--cors-allo ### surprising incompatibilities -- [microsoft editor extension for chrome/edge seems to disable the overmask slider]() +- [microsoft editor extension for chrome/edge seems to disable the overmask slider](https://github.com/zero01101/openOutpaint/discussions/88#discussioncomment-4498341) - [duckduckgo privacy extension for firefox breaks outpainting, resulting in pure black output](https://github.com/zero01101/openOutpaint-webUI-extension/issues/3#issuecomment-1367694000) - add an exception for your openOutpaint host (likely localhost or 127.0.0.1) ### quickstart speedrun From 668e4614571c02a81444edd6d9cf986362bdf084 Mon Sep 17 00:00:00 2001 From: tim h Date: Thu, 29 Dec 2022 21:58:35 -0600 Subject: [PATCH 04/11] Revert "update incompatibilities broken link" This reverts commit 7e4f6523b8f8569b644d5597112a0fa27d5221d7. --- .devtools/updatehashes.sh | 7 ++----- README.md | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.devtools/updatehashes.sh b/.devtools/updatehashes.sh index c18f560..372b37f 100644 --- a/.devtools/updatehashes.sh +++ b/.devtools/updatehashes.sh @@ -94,18 +94,16 @@ do done # Actual file processing -for htmlfile in $(find -type f -name \*.html -not -path "./node_modules/*") +for htmlfile in $(find -type f -name \*.html) do echo -e "${BIBlue}[info] Processing '${htmlfile}' for cache busting...${Color_Off}" - for resourcefile in $(find -type f -regex '.*\.css\|.*\.js' -not -path "./node_modules/*" | sed 's/\.\///g') + for resourcefile in $(find -type f -regex '.*\.css\|.*\.js' | sed 's/\.\///g') do - echo "inside loop 1: $resourcefile" # Check if resource is used in html file resourceusage=$(grep -i "$resourcefile" "$htmlfile") if [ $? -eq 0 ] then - echo "inside loop 2: $resourcefile $htmlfile" # This is just for cache busting... # If 7 first characters of SHA1 is okay for git, it should be more than enough for us hash="$(sha1sum $resourcefile | cut -d' ' -f1 | head -c 7)" @@ -113,7 +111,6 @@ do # Check if resource hash is already correct if ! echo "$resourceusage" | grep -i "=$hash\"" > /dev/null then - echo "inside loop 3: $resourcefile" escaped=$(echo $resourcefile | sed 's/\//\\\//g' | sed 's/\./\\./g') sed -Ei "s/${escaped}(\?v=[a-z0-9]+)?/${escaped}?v=${hash}/g" "$htmlfile" diff --git a/README.md b/README.md index 6e72579..a365f60 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ A1111 webUI must be launched with the `--api` flag enabled, and the `--cors-allo ### surprising incompatibilities -- [microsoft editor extension for chrome/edge seems to disable the overmask slider](https://github.com/zero01101/openOutpaint/discussions/88#discussioncomment-4498341) +- [microsoft editor extension for chrome/edge seems to disable the overmask slider]() - [duckduckgo privacy extension for firefox breaks outpainting, resulting in pure black output](https://github.com/zero01101/openOutpaint-webUI-extension/issues/3#issuecomment-1367694000) - add an exception for your openOutpaint host (likely localhost or 127.0.0.1) ### quickstart speedrun From 90c9c38b7691734fe642801f5cdaeb5f8c173790 Mon Sep 17 00:00:00 2001 From: tim h Date: Thu, 29 Dec 2022 22:00:04 -0600 Subject: [PATCH 05/11] just update readme this time --- .devtools/updatehashes.sh | 4 ++-- README.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.devtools/updatehashes.sh b/.devtools/updatehashes.sh index 372b37f..d62cab5 100644 --- a/.devtools/updatehashes.sh +++ b/.devtools/updatehashes.sh @@ -94,11 +94,11 @@ do done # Actual file processing -for htmlfile in $(find -type f -name \*.html) +for htmlfile in $(find -type f -name \*.html -not -path "./node_modules/*") do echo -e "${BIBlue}[info] Processing '${htmlfile}' for cache busting...${Color_Off}" - for resourcefile in $(find -type f -regex '.*\.css\|.*\.js' | sed 's/\.\///g') + for resourcefile in $(find -type f -regex '.*\.css\|.*\.js' -not -path "./node_modules/*" | sed 's/\.\///g') do # Check if resource is used in html file resourceusage=$(grep -i "$resourcefile" "$htmlfile") diff --git a/README.md b/README.md index a365f60..6e72579 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ A1111 webUI must be launched with the `--api` flag enabled, and the `--cors-allo ### surprising incompatibilities -- [microsoft editor extension for chrome/edge seems to disable the overmask slider]() +- [microsoft editor extension for chrome/edge seems to disable the overmask slider](https://github.com/zero01101/openOutpaint/discussions/88#discussioncomment-4498341) - [duckduckgo privacy extension for firefox breaks outpainting, resulting in pure black output](https://github.com/zero01101/openOutpaint-webUI-extension/issues/3#issuecomment-1367694000) - add an exception for your openOutpaint host (likely localhost or 127.0.0.1) ### quickstart speedrun From 6d31640ae5aac4ea359bc85f7fa9086e4a74adb3 Mon Sep 17 00:00:00 2001 From: Victor Seiji Hariki Date: Fri, 30 Dec 2022 07:27:26 -0300 Subject: [PATCH 06/11] now only adds html files Signed-off-by: Victor Seiji Hariki --- .githooks/pre-commit | 2 +- index.html | 4 ++-- js/ui/tool/generic.js | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.githooks/pre-commit b/.githooks/pre-commit index 1b2e84a..e0a6f7a 100755 --- a/.githooks/pre-commit +++ b/.githooks/pre-commit @@ -6,4 +6,4 @@ sh .devtools/updatehashes.sh # Adds file to current commit -git add --all \ No newline at end of file +git add "**.html" \ No newline at end of file diff --git a/index.html b/index.html index faf2671..a01d26e 100644 --- a/index.html +++ b/index.html @@ -345,10 +345,10 @@ - + diff --git a/js/ui/tool/generic.js b/js/ui/tool/generic.js index 56e3a6b..c9be07f 100644 --- a/js/ui/tool/generic.js +++ b/js/ui/tool/generic.js @@ -35,10 +35,10 @@ const _tool = { uiCtx.save(); - // draw targeting square reticle thingy cursor + // Draw targeting square reticle thingy cursor uiCtx.lineWidth = style.reticleWidth; uiCtx.strokeStyle = style.reticleStyle; - uiCtx.strokeRect(bbvp.x, bbvp.y, bbvp.w, bbvp.h); //origin is middle of the frame + uiCtx.strokeRect(bbvp.x, bbvp.y, bbvp.w, bbvp.h); // Origin is middle of the frame uiCtx.font = `bold 20px Open Sans`; From 1fbde7ed69b5d65ffffcafd2af986fd2d1a7ff1c Mon Sep 17 00:00:00 2001 From: seijihariki Date: Fri, 30 Dec 2022 10:28:16 +0000 Subject: [PATCH 07/11] Fixed resource hashes --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index a01d26e..91dda21 100644 --- a/index.html +++ b/index.html @@ -348,7 +348,7 @@ src="js/ui/tool/generic.js?v=2bcd36d" type="text/javascript"> - + From c4d52fdfad6ccfdb56e3e715af22f4447f19652b Mon Sep 17 00:00:00 2001 From: Victor Seiji Hariki Date: Fri, 30 Dec 2022 07:44:10 -0300 Subject: [PATCH 08/11] now only considers staged files Signed-off-by: Victor Seiji Hariki --- .devtools/updatehashes.sh | 9 ++++++++- .githooks/pre-commit | 2 +- js/ui/explore.js | 3 --- js/ui/tool/populate.js | 0 4 files changed, 9 insertions(+), 5 deletions(-) mode change 100644 => 100755 .devtools/updatehashes.sh delete mode 100644 js/ui/explore.js delete mode 100644 js/ui/tool/populate.js diff --git a/.devtools/updatehashes.sh b/.devtools/updatehashes.sh old mode 100644 new mode 100755 index d62cab5..e52c675 --- a/.devtools/updatehashes.sh +++ b/.devtools/updatehashes.sh @@ -98,7 +98,14 @@ for htmlfile in $(find -type f -name \*.html -not -path "./node_modules/*") do echo -e "${BIBlue}[info] Processing '${htmlfile}' for cache busting...${Color_Off}" - for resourcefile in $(find -type f -regex '.*\.css\|.*\.js' -not -path "./node_modules/*" | sed 's/\.\///g') + LIST=$(find -type f -regex '.*\.css\|.*\.js' -not -path "./node_modules/*" | sed 's/\.\///g') + + if [ "$1" = "gitadd" ] + then + LIST=$(git status -s | grep -oE "[A-Z] .+" | cut -d" " -f3) + fi + + for resourcefile in $LIST do # Check if resource is used in html file resourceusage=$(grep -i "$resourcefile" "$htmlfile") diff --git a/.githooks/pre-commit b/.githooks/pre-commit index e0a6f7a..3bfde07 100755 --- a/.githooks/pre-commit +++ b/.githooks/pre-commit @@ -3,7 +3,7 @@ # Script to perform some basic operations to the code before committing. # Adds file hashes to html script imports for cache busting purposes -sh .devtools/updatehashes.sh +sh .devtools/updatehashes.sh gitadd # Adds file to current commit git add "**.html" \ No newline at end of file diff --git a/js/ui/explore.js b/js/ui/explore.js deleted file mode 100644 index 212a275..0000000 --- a/js/ui/explore.js +++ /dev/null @@ -1,3 +0,0 @@ -/** - * This is a simple implementation of layer interaction - */ diff --git a/js/ui/tool/populate.js b/js/ui/tool/populate.js deleted file mode 100644 index e69de29..0000000 From 84d30bbd7bdc6bf72f83b8613295a85518706098 Mon Sep 17 00:00:00 2001 From: Victor Seiji Hariki Date: Fri, 30 Dec 2022 08:03:35 -0300 Subject: [PATCH 09/11] add dark reader to possible incompatibility list also add some instructions for debugging weird specific problems Signed-off-by: Victor Seiji Hariki --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 6e72579..a1c3041 100644 --- a/README.md +++ b/README.md @@ -56,8 +56,11 @@ A1111 webUI must be launched with the `--api` flag enabled, and the `--cors-allo ### surprising incompatibilities +If anything goes wrong with openOutpaint, try running it on another browser and disable all extensions and try again. If a new incompatible extension is found, please open an issue so we can notify other users of extension incompatibilities. + - [microsoft editor extension for chrome/edge seems to disable the overmask slider](https://github.com/zero01101/openOutpaint/discussions/88#discussioncomment-4498341) - [duckduckgo privacy extension for firefox breaks outpainting, resulting in pure black output](https://github.com/zero01101/openOutpaint-webUI-extension/issues/3#issuecomment-1367694000) - add an exception for your openOutpaint host (likely localhost or 127.0.0.1) +- [same for dark reader](https://github.com/zero01101/openOutpaint-webUI-extension/issues/3#issuecomment-1367838766) ### quickstart speedrun From 4ebdd9ffa6c036a788269882891ed00e147afee9 Mon Sep 17 00:00:00 2001 From: Victor Seiji Hariki Date: Fri, 30 Dec 2022 16:17:29 -0300 Subject: [PATCH 10/11] Only consider text input focus as active This resolves comment on #116 Signed-off-by: Victor Seiji Hariki --- js/lib/util.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/js/lib/util.js b/js/lib/util.js index 22b3c1c..850b346 100644 --- a/js/lib/util.js +++ b/js/lib/util.js @@ -140,10 +140,13 @@ class DOM { * @returns Whether there is currently an active input */ static hasActiveInput() { - return ( - document.activeElement && - this.inputTags.has(document.activeElement.tagName.toLowerCase()) - ); + const active = document.activeElement; + const tag = active.tagName.toLowerCase(); + + const checkTag = this.inputTags.has(tag); + if (!checkTag) return false; + + return tag !== "input" || active.type === "text"; } } From 395dfad628141d020e79277c6069822e48834449 Mon Sep 17 00:00:00 2001 From: seijihariki Date: Fri, 30 Dec 2022 19:22:23 +0000 Subject: [PATCH 11/11] Fixed resource hashes --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 91dda21..b58a5dd 100644 --- a/index.html +++ b/index.html @@ -316,7 +316,7 @@ - +