#104 deparam changed ref: https://www.sitepoint.com/get-url-parameters-with-javascript/
parent
1abd55a698
commit
f3ee637903
|
@ -7,8 +7,7 @@
|
|||
"stackblur-canvas",
|
||||
"regenerator-runtime",
|
||||
"core-js-bundle",
|
||||
"underscore",
|
||||
"deparam"
|
||||
"underscore"
|
||||
],
|
||||
"filesByLicense": {
|
||||
"(MIT OR GPL-2.0)": ["src/editor/jquerybbq/jquery.bbq.min.js"],
|
||||
|
|
|
@ -96,7 +96,6 @@
|
|||
"@web/dev-server-rollup": "0.3.4",
|
||||
"canvg": "3.0.7",
|
||||
"core-js": "3.12.1",
|
||||
"deparam": "1.0.5",
|
||||
"elix": "15.0.0",
|
||||
"i18next": "20.3.0",
|
||||
"jquery": "3.6.0",
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// eslint-disable-next-line node/no-unpublished-import
|
||||
import deparam from 'deparam';
|
||||
import { mergeDeep } from './components/jgraduate/Util.js';
|
||||
|
||||
/**
|
||||
|
@ -240,9 +239,12 @@ export default class ConfigObj {
|
|||
*/
|
||||
loadFromURL () {
|
||||
const { search, searchParams } = new URL(location);
|
||||
|
||||
if (search) {
|
||||
this.urldata = deparam(searchParams.toString());
|
||||
this.urldata = {};
|
||||
const entries = searchParams.entries();
|
||||
for(const entry of entries) {
|
||||
this.urldata[entry[0]] = entry[1];
|
||||
}
|
||||
|
||||
[ 'initStroke', 'initFill' ].forEach((prop) => {
|
||||
if (searchParams.has(`${prop}[color]`)) {
|
||||
|
|
Loading…
Reference in New Issue