@4site/engrid-scripts 0.19.1 → 0.19.2
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/dist/data-attributes.js +7 -0
- package/dist/src-defer.js +3 -3
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
package/dist/data-attributes.js
CHANGED
|
@@ -118,5 +118,12 @@ export class DataAttributes {
|
|
|
118
118
|
// Add demo data attribute
|
|
119
119
|
if (ENGrid.demo)
|
|
120
120
|
ENGrid.setBodyData("demo", "");
|
|
121
|
+
// Add data-first-page and data-last-page
|
|
122
|
+
if (ENGrid.getPageNumber() === 1) {
|
|
123
|
+
ENGrid.setBodyData("first-page", "");
|
|
124
|
+
}
|
|
125
|
+
if (ENGrid.getPageNumber() === ENGrid.getPageCount()) {
|
|
126
|
+
ENGrid.setBodyData("last-page", "");
|
|
127
|
+
}
|
|
121
128
|
}
|
|
122
129
|
}
|
package/dist/src-defer.js
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
// srcDefer[i].setAttribute("decoding", "async"); // Gets image processing off the main working thread
|
|
10
10
|
// srcDefer[i].setAttribute("loading", "lazy"); // Lets the browser determine when the asset should be downloaded
|
|
11
11
|
// srcDefer[i].setAttribute("src", dataSrc); // Sets the src which will cause the browser to retrieve the asset
|
|
12
|
-
// srcDefer[i].setAttribute("data-engrid-data-src-processed", "true"); // Sets an attribute to mark that it has been processed by
|
|
12
|
+
// srcDefer[i].setAttribute("data-engrid-data-src-processed", "true"); // Sets an attribute to mark that it has been processed by ENgrid
|
|
13
13
|
// srcDefer[i].removeAttribute("data-src"); // Removes the data-source
|
|
14
14
|
// }
|
|
15
15
|
// }
|
|
@@ -30,7 +30,7 @@ export class SrcDefer {
|
|
|
30
30
|
if (imgDataSrc) {
|
|
31
31
|
img.setAttribute("src", imgDataSrc); // Sets the src which will cause the browser to retrieve the asset
|
|
32
32
|
}
|
|
33
|
-
img.setAttribute("data-engrid-data-src-processed", "true"); // Sets an attribute to mark that it has been processed by
|
|
33
|
+
img.setAttribute("data-engrid-data-src-processed", "true"); // Sets an attribute to mark that it has been processed by ENgrid
|
|
34
34
|
img.removeAttribute("data-src"); // Removes the data-source
|
|
35
35
|
}
|
|
36
36
|
}
|
|
@@ -47,7 +47,7 @@ export class SrcDefer {
|
|
|
47
47
|
let videoBackgroundSourcedDataSrc = videoSource.getAttribute("data-src");
|
|
48
48
|
if (videoBackgroundSourcedDataSrc) {
|
|
49
49
|
videoSource.setAttribute("src", videoBackgroundSourcedDataSrc);
|
|
50
|
-
videoSource.setAttribute("data-engrid-data-src-processed", "true"); // Sets an attribute to mark that it has been processed by
|
|
50
|
+
videoSource.setAttribute("data-engrid-data-src-processed", "true"); // Sets an attribute to mark that it has been processed by ENgrid
|
|
51
51
|
videoSource.removeAttribute("data-src"); // Removes the data-source
|
|
52
52
|
}
|
|
53
53
|
}
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const AppVersion = "0.19.
|
|
1
|
+
export declare const AppVersion = "0.19.2";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const AppVersion = "0.19.
|
|
1
|
+
export const AppVersion = "0.19.2";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@4site/engrid-scripts",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.2",
|
|
4
4
|
"description": "Scripts for the ENGRID Project",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"strongly-typed-events": "^2.0.9"
|
|
26
26
|
},
|
|
27
27
|
"homepage": "https://github.com/4site-interactive-studios/engrid#readme",
|
|
28
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "4efb6b11b47ebe4a9a835465dc3a3b2d8574e697",
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"nodemon": "^2.0.20"
|
|
31
31
|
}
|