script.io.js 2026.125.1832 → 2026.126.106
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/node_packages/html.js +30 -7
- package/node_packages/script.js +1 -0
- package/package.json +1 -1
package/node_packages/html.js
CHANGED
|
@@ -51,6 +51,11 @@ Define (Function.markup, "render", function (markup, tab) {
|
|
|
51
51
|
return new Function.markup (markup, tab).render ();
|
|
52
52
|
});
|
|
53
53
|
|
|
54
|
+
Define (Function.markup, "value", function (value) {
|
|
55
|
+
if (Array.isArray (value)) return value.join (", ");
|
|
56
|
+
else return value;
|
|
57
|
+
});
|
|
58
|
+
|
|
54
59
|
/**
|
|
55
60
|
* html
|
|
56
61
|
*
|
|
@@ -97,13 +102,13 @@ Define (Function, "html", class {
|
|
|
97
102
|
this.head.meta ({charset: this.var.charset});
|
|
98
103
|
this.head.meta ({"http-equiv": "X-UA-Compatible", content: "IE=edge"});
|
|
99
104
|
this.head.meta ({"http-equiv": "X-Cross-Origin", content: "*"});
|
|
100
|
-
this.head.meta ({name: "viewport", content: this.var
|
|
101
|
-
this.head.meta ({name: "generator", content: this.var
|
|
102
|
-
this.head.meta ({name: "author", content: this.var
|
|
105
|
+
this.head.meta ({name: "viewport", content: this.var.viewport || "width=device-width, initial-scale=1.0, maximum-scale=3.0, user-scalable=1"});
|
|
106
|
+
this.head.meta ({name: "generator", content: this.var.generator || "Vercel" || "Express (5.2.1) Vue (3.5.27)"});
|
|
107
|
+
this.head.meta ({name: "author", content: this.var.author || this.var ["site:name"]});
|
|
103
108
|
this.head.meta ({name: "description", content: this.var.description});
|
|
104
|
-
this.head.meta ({name: "keywords", content: this.var
|
|
105
|
-
this.head.meta ({name: "robots", content: this.var
|
|
106
|
-
this.head.meta ({name: "rating", content: this.var
|
|
109
|
+
this.head.meta ({name: "keywords", content: Function.markup.value (this.var.keyword)});
|
|
110
|
+
this.head.meta ({name: "robots", content: this.var.robot || "index, follow, max-snippet:-1, max-video-preview:-1, max-image-preview:large"});
|
|
111
|
+
this.head.meta ({name: "rating", content: this.var.rating || "general"});
|
|
107
112
|
this.head.meta ({name: "google", content: "notranslate"});
|
|
108
113
|
this.head.meta ({name: "googlebot", content: "notranslate"});
|
|
109
114
|
this.head.meta ({name: "googlebot-news", content: this.var ["google-bot:article"] || "index, follow"});
|
|
@@ -166,9 +171,12 @@ Define (Function, "html", class {
|
|
|
166
171
|
for (var i in this.head.data.link) this.markup.push (2, `<link${Function.html.attribute (this.head.data.link [i].attribute, {space: true, prop: this.head.data.link [i].prop})}>`);
|
|
167
172
|
for (var i in this.head.data.style) this.markup.push (2, `<style${Function.html.attribute (this.head.data.style [i].attribute, {space: true, prop: this.head.data.style [i].prop})}>${this.head.data.style [i].css}</style>`);
|
|
168
173
|
for (var i in this.head.data.script) this.markup.push (2, `<script${Function.html.attribute (this.head.data.script [i].attribute, {space: true, prop: this.head.data.script [i].prop})}></script>`);
|
|
169
|
-
|
|
174
|
+
this.markup.push (2, `<script type="application/ld+json">{"@context": "https://schema.org", "@type": "WebPage", "name": "{{ site:name }}", "alternateName": "{{ site:alternate-name }}", "url": "{{ canonical }}", "description": "{{ meta:description }}"}</script>`);
|
|
175
|
+
this.markup.push (2, `<script type="application/ld+json">{"@context": "https://schema.org", "@graph": [{"@type": "website", "@id": "{{ canonical }}", "name": "{{ site:name }}", "url": "{{ canonical }}", "description": "{{ meta:description }}"}]}</script>`);
|
|
170
176
|
this.markup.push (2, `<script>vue.app.theme = {{ vue.app.theme }}</script>`);
|
|
171
177
|
this.markup.push (2, `<script>vue.app.var = {{ vue.app.var }}</script>`);
|
|
178
|
+
if (this.var ["google-tag-manager"]) this.markup.push (2, `<script>window.dataLayer = window.dataLayer || []; function gtag () { dataLayer.push (arguments); gtag ("js", new Date ()); gtag ("config", "${this.var ['google-tag-manager']}"); }</script>`);
|
|
179
|
+
this.markup.push (2, `<style>img:is([sizes="auto" i], [sizes^="auto," i]) { contain-intrinsic-size: 3000px 1500px }</style>`);
|
|
172
180
|
this.markup.push (2, `<style>[application] { opacity: 0; }</style>`);
|
|
173
181
|
this.markup.push (1, `</head>`);
|
|
174
182
|
this.markup.push (1, `<body>`);
|
|
@@ -186,6 +194,11 @@ Define (Function, "html", class {
|
|
|
186
194
|
});
|
|
187
195
|
|
|
188
196
|
Define (Function.html, "template", function () {});
|
|
197
|
+
Define (Function.html.template, "default", [
|
|
198
|
+
"<div>",
|
|
199
|
+
" <p>hello world</p>",
|
|
200
|
+
"</div>",
|
|
201
|
+
]);
|
|
189
202
|
Define (Function.html.template, "test", function () {
|
|
190
203
|
var markup = new Function.markup (`
|
|
191
204
|
<div>
|
|
@@ -255,3 +268,13 @@ Symbol.export.html = Function.html;
|
|
|
255
268
|
*
|
|
256
269
|
* xxx://xxx.xxx.xxx/xxx
|
|
257
270
|
*/
|
|
271
|
+
|
|
272
|
+
/*
|
|
273
|
+
<script type="application/ld+json">
|
|
274
|
+
{"@context": "https://schema.org", "@type": "WebPage", "name": "{{ site:name }}", "alternateName": "{{ site:alternate-name }}", "description": "{{ meta:description }}", "url": "{{ canonical }}"}
|
|
275
|
+
</script>
|
|
276
|
+
|
|
277
|
+
<script type="application/ld+json">
|
|
278
|
+
{"@context": "https://schema.org/", "@graph": [{"@type": "website", "@id": "{{ canonical }}", "name": "{{ site:name }}", "url": "{{ canonical }}", "description": ""{{ meta:description }}}]}
|
|
279
|
+
</script>
|
|
280
|
+
*/
|
package/node_packages/script.js
CHANGED
|
@@ -895,6 +895,7 @@ Symbol.export = {
|
|
|
895
895
|
ajax: Function.ajax, owl: Function.owl,
|
|
896
896
|
express: Function.express, mongo: Function.mongo, firebase: Function.firebase, appwrite: Function.appwrite,
|
|
897
897
|
cloudflare: Function.cloudflare, google: Function.google,
|
|
898
|
+
zero: 0, one: 1,
|
|
898
899
|
}
|
|
899
900
|
|
|
900
901
|
/**
|
package/package.json
CHANGED