@devskin/browser-sdk 1.0.22 → 1.0.23
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/collectors/screenshot.d.ts.map +1 -1
- package/dist/devskin.cjs.js +9 -2
- package/dist/devskin.cjs.js.map +1 -1
- package/dist/devskin.esm.js +9 -2
- package/dist/devskin.esm.js.map +1 -1
- package/dist/devskin.umd.js +9 -2
- package/dist/devskin.umd.js.map +1 -1
- package/dist/devskin.umd.min.js +1 -1
- package/dist/devskin.umd.min.js.map +1 -1
- package/package.json +1 -1
package/dist/devskin.esm.js
CHANGED
|
@@ -8929,13 +8929,20 @@ class ScreenshotCollector {
|
|
|
8929
8929
|
if (this.config.debug) {
|
|
8930
8930
|
console.log('[DevSkin] Capturing page screenshot...');
|
|
8931
8931
|
}
|
|
8932
|
+
// Get full page dimensions
|
|
8933
|
+
const fullWidth = Math.max(document.body.scrollWidth, document.documentElement.scrollWidth, document.body.offsetWidth, document.documentElement.offsetWidth, document.body.clientWidth, document.documentElement.clientWidth);
|
|
8934
|
+
const fullHeight = Math.max(document.body.scrollHeight, document.documentElement.scrollHeight, document.body.offsetHeight, document.documentElement.offsetHeight, document.body.clientHeight, document.documentElement.clientHeight);
|
|
8932
8935
|
const canvas = yield html2canvas(document.body, {
|
|
8933
8936
|
allowTaint: true,
|
|
8934
8937
|
useCORS: true,
|
|
8935
8938
|
logging: false,
|
|
8936
8939
|
scale: 0.5, // Reduce size
|
|
8937
|
-
width:
|
|
8938
|
-
height:
|
|
8940
|
+
width: fullWidth,
|
|
8941
|
+
height: fullHeight, // Capture ENTIRE page
|
|
8942
|
+
windowWidth: fullWidth,
|
|
8943
|
+
windowHeight: fullHeight,
|
|
8944
|
+
x: 0,
|
|
8945
|
+
y: 0,
|
|
8939
8946
|
});
|
|
8940
8947
|
// Convert to base64 JPEG (smaller than PNG)
|
|
8941
8948
|
const screenshot = canvas.toDataURL('image/jpeg', 0.6);
|