mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-08-15 08:53:07 +09:00
DevTools - gcli - screenshot - the vertical mode
https://github.com/MoonchildProductions/moebius/pull/166
This commit is contained in:
parent
7177b5926a
commit
1a8810305a
1 changed files with 6 additions and 0 deletions
|
|
@ -277,6 +277,12 @@ function createScreenshotData(document, args) {
|
|||
window.scrollTo(0,0);
|
||||
width = window.innerWidth + window.scrollMaxX - window.scrollMinX;
|
||||
height = window.innerHeight + window.scrollMaxY - window.scrollMinY;
|
||||
let writingMode = "horizontal-tb";
|
||||
if (window.getComputedStyle(document.documentElement)) {
|
||||
writingMode = window.getComputedStyle(document.documentElement).writingMode;
|
||||
}
|
||||
let orientation = writingMode.substring(0, writingMode.indexOf("-")).toLowerCase();
|
||||
left = ((orientation != "vertical") ? left : (-width + window.innerWidth));
|
||||
filename = filename.replace(".png", "-fullpage.png");
|
||||
}
|
||||
else if (args.selector) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue