@whitesev/utils 2.6.1 → 2.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +674 -0
- package/dist/index.amd.js +10 -4
- package/dist/index.amd.js.map +1 -1
- package/dist/index.cjs.js +10 -4
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +10 -4
- package/dist/index.esm.js.map +1 -1
- package/dist/index.iife.js +10 -4
- package/dist/index.iife.js.map +1 -1
- package/dist/index.system.js +10 -4
- package/dist/index.system.js.map +1 -1
- package/dist/index.umd.js +10 -4
- package/dist/index.umd.js.map +1 -1
- package/dist/types/src/UtilsGMCookie.d.ts +3 -4
- package/dist/types/src/types/UtilsGMCookie.d.ts +2 -2
- package/package.json +52 -52
- package/src/Utils.ts +1 -1
- package/src/UtilsGMCookie.ts +13 -9
- package/src/types/UtilsGMCookie.d.ts +2 -2
package/dist/index.umd.js
CHANGED
|
@@ -384,7 +384,7 @@
|
|
|
384
384
|
url: this.windowApi.window.location.href,
|
|
385
385
|
name: "",
|
|
386
386
|
value: "",
|
|
387
|
-
domain:
|
|
387
|
+
domain: "",
|
|
388
388
|
path: "/",
|
|
389
389
|
secure: true,
|
|
390
390
|
httpOnly: false,
|
|
@@ -403,6 +403,9 @@
|
|
|
403
403
|
";expires=" +
|
|
404
404
|
new Date(life).toGMTString() +
|
|
405
405
|
"; path=/";
|
|
406
|
+
if (utils.isNotNull(defaultOption.domain)) {
|
|
407
|
+
cookieStr += "; domain=" + defaultOption.domain;
|
|
408
|
+
}
|
|
406
409
|
this.windowApi.document.cookie = cookieStr;
|
|
407
410
|
}
|
|
408
411
|
catch (error) {
|
|
@@ -426,10 +429,13 @@
|
|
|
426
429
|
url: this.windowApi.window.location.href,
|
|
427
430
|
name: "",
|
|
428
431
|
path: "/",
|
|
429
|
-
firstPartyDomain:
|
|
432
|
+
firstPartyDomain: "",
|
|
430
433
|
};
|
|
431
434
|
defaultOption = utils.assign(defaultOption, option);
|
|
432
|
-
let cookieStr = `${defaultOption.name}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=${defaultOption.path}
|
|
435
|
+
let cookieStr = `${defaultOption.name}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=${defaultOption.path}`;
|
|
436
|
+
if (utils.isNotNull(defaultOption.firstPartyDomain)) {
|
|
437
|
+
cookieStr += `; domain=${defaultOption.firstPartyDomain};`;
|
|
438
|
+
}
|
|
433
439
|
this.windowApi.document.cookie = cookieStr;
|
|
434
440
|
}
|
|
435
441
|
catch (error) {
|
|
@@ -5041,7 +5047,7 @@
|
|
|
5041
5047
|
this.windowApi = new WindowApi(option);
|
|
5042
5048
|
}
|
|
5043
5049
|
/** 版本号 */
|
|
5044
|
-
version = "2025.
|
|
5050
|
+
version = "2025.3.25";
|
|
5045
5051
|
addStyle(cssText) {
|
|
5046
5052
|
if (typeof cssText !== "string") {
|
|
5047
5053
|
throw new Error("Utils.addStyle 参数cssText 必须为String类型");
|