Update, and fix "port-lock" workaround to work again and (hopefully) be a little more future-proof.

This commit is contained in:
DUOLabs333
2025-07-24 23:37:43 -04:00
parent 760805ada5
commit 43f90f0ae5
14 changed files with 23977 additions and 21481 deletions
+8 -4
View File
@@ -187,12 +187,16 @@
if(added) return; added=true; console.log("adding");
var fls = [
"style/all09.css",
"code/ext/ext1727353186.js",
"code/dbs/DBS1727686859.js",
"code/pp/pp1728070986.js"
"code/ext/ext1753387088.js",
"code/dbs/DBS1751979998.js",
"code/pp/pp1753360222.js"
];
var fromCDN = window.location.host=="www.photopea.com" && !window.location.href.endsWith("nocdn");
var ao = window.location.ancestorOrigins;
if(ao) for(var i=0; i<ao.length; i++) if(ao[i].indexOf("figma.com")!=-1) fromCDN=false;
for(var i=0; i<fls.length; i++) {
var url = (window.location.host=="www.photopea.com"?"//vecpea.com/":"")+fls[i], isJS = url.endsWith(".js");
var url = (fromCDN?"//vecpea.com/":"")+fls[i], isJS = url.endsWith(".js");
var el = document.createElement(isJS ? "script" : "link");
el.setAttribute(isJS ? "src" : "href",url);
if(!isJS) el.setAttribute("rel","stylesheet");