script.io.js 1.0.6 → 1.0.96
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/script.js +17 -2
- package/package.json +1 -1
package/node_packages/script.js
CHANGED
|
@@ -117,6 +117,18 @@ Define (String.prototype, "join", function (string) { return this + string; });
|
|
|
117
117
|
* xxx://xxx.xxx.xxx/xxx
|
|
118
118
|
*/
|
|
119
119
|
|
|
120
|
+
/**
|
|
121
|
+
* json
|
|
122
|
+
*
|
|
123
|
+
* title
|
|
124
|
+
* description
|
|
125
|
+
* sub description
|
|
126
|
+
*
|
|
127
|
+
* xxx://xxx.xxx.xxx/xxx
|
|
128
|
+
*/
|
|
129
|
+
|
|
130
|
+
JSON.pretty = function (json) { return JSON.stringify (json, null, "\t"); }
|
|
131
|
+
|
|
120
132
|
/**
|
|
121
133
|
* url
|
|
122
134
|
*
|
|
@@ -258,7 +270,7 @@ Define (Function, "html", class {
|
|
|
258
270
|
}
|
|
259
271
|
set (key, value) {
|
|
260
272
|
if (key === "html:attribute") for (var i in value) this.var ["html:attribute"][i] = value [i];
|
|
261
|
-
else if (key === "
|
|
273
|
+
else if (key === "language") this.var ["html:attribute"]["lang"] = value;
|
|
262
274
|
else if (key === "meta") this.var.meta.push (value);
|
|
263
275
|
else if (key === "link:style") this.var.link.style.push (value);
|
|
264
276
|
else if (key === "google:font") this.var.google.font.push (value);
|
|
@@ -267,7 +279,7 @@ Define (Function, "html", class {
|
|
|
267
279
|
}
|
|
268
280
|
delete (key, value) {
|
|
269
281
|
if (key === "html:attribute") delete this.var ["html:attribute"][value];
|
|
270
|
-
else if (key === "
|
|
282
|
+
else if (key === "language") delete this.var ["html:attribute"]["lang"];
|
|
271
283
|
else delete this.var [key];
|
|
272
284
|
return this;
|
|
273
285
|
}
|
|
@@ -338,6 +350,9 @@ Define (Function, "html", class {
|
|
|
338
350
|
this.markup.push (1, `<body>`);
|
|
339
351
|
this.markup.push (1, `</body>`);
|
|
340
352
|
this.markup.push (0, `</html>`);
|
|
353
|
+
this.markup.push (0, `<!--`);
|
|
354
|
+
this.markup.push (0, (this.var.debug || ""));
|
|
355
|
+
this.markup.push (0, `-->`);
|
|
341
356
|
return this.markup.string ().format (variable);
|
|
342
357
|
}
|
|
343
358
|
});
|