diff --git a/.devtools/updatehashes.sh b/.devtools/updatehashes.sh old mode 100644 new mode 100755 index 372b37f..e52c675 --- a/.devtools/updatehashes.sh +++ b/.devtools/updatehashes.sh @@ -94,11 +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') + 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 1b2e84a..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 --all \ No newline at end of file +git add "**.html" \ No newline at end of file diff --git a/README.md b/README.md index a16f2ac..a1c3041 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,14 @@ 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 + +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 1. edit your `cors-allow-origins` to include https://zero01101.github.io and run webUI diff --git a/index.html b/index.html index 7e7ea31..ac1b141 100644 --- a/index.html +++ b/index.html @@ -316,7 +316,7 @@ - + @@ -345,7 +345,7 @@ 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"; } } 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/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`; diff --git a/js/ui/tool/populate.js b/js/ui/tool/populate.js deleted file mode 100644 index e69de29..0000000