mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-16 11:47:54 +01:00
clipper(web): add fallback height & width for web clip(#3766)
This commit is contained in:
committed by
Ammar Ahmed
parent
3c876cb1d8
commit
3873758fe5
@@ -55,8 +55,16 @@ function attachMessagePort() {
|
||||
message.area === "full-page" &&
|
||||
(message.mode === "complete" || message.mode === "screenshot");
|
||||
return {
|
||||
height: sizeable ? document.body.clientHeight : 0,
|
||||
width: sizeable ? document.body.clientWidth : 0,
|
||||
height: sizeable
|
||||
? document.body.clientHeight ||
|
||||
document.firstElementChild?.scrollHeight ||
|
||||
1080
|
||||
: 0,
|
||||
width: sizeable
|
||||
? document.body.clientWidth ||
|
||||
document.firstElementChild?.scrollWidth ||
|
||||
1920
|
||||
: 0,
|
||||
data: await clip(request)
|
||||
};
|
||||
}
|
||||
|
||||
@@ -25,7 +25,8 @@
|
||||
"scripts": {
|
||||
"build": "tsc && yarn webpack -c webpack.config.js",
|
||||
"test": "playwright test",
|
||||
"postinstall": "patch-package"
|
||||
"postinstall": "patch-package",
|
||||
"watch": "tsc --watch"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/streetwriters/notesnook/issues"
|
||||
|
||||
Reference in New Issue
Block a user