Make "Force enable 'Remove BG'" patch slightly more stable. Also make it work for any menu item that is disabled on self-hosted instances.

This commit is contained in:
DUOLabs333 2023-07-26 14:10:26 -04:00
parent 6d40508e90
commit 52ddb10929
4 changed files with 17277 additions and 17273 deletions

View File

@ -186,7 +186,7 @@ find_and_replace('code/pp/pp.js','"&rsrc="','""')
find_and_replace('code/pp/pp.js','"templates/?type="','"templates/index.html?type="')
find_and_replace('code/pp/pp.js','"https://f000.backblazeb2.com/file/"', '"templates/file/"')
#Force enable Remove BG (much more brittle than the other replacements)
find_and_replace("code/pp/pp.js",'{name:"Remove BG"','{name:"Remove BG",w:function(W){true}},{name:"Remove BG"')
#Force enable Remove BG, and any other options that are disabled on self-hosted instances (much more brittle to changes than the other replacements)
find_and_replace("code/pp/pp.js",'("~yy")','("~yy")||true;')
# Having ? in static sites doesn't really work
#find_and_replace("templates/index.html",'sch.split("?");','sch.split("#");')

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long