aboutsummaryrefslogtreecommitdiff
path: root/cli/CliOptionsParser.php
diff options
context:
space:
mode:
authorGravatar Inverle <inverle@proton.me> 2025-08-06 21:49:13 +0200
committerGravatar GitHub <noreply@github.com> 2025-08-06 21:49:13 +0200
commit149136fbe252cca4cb8dcdb463df135094bc0f87 (patch)
tree9ca659760b0be19b71bff5c41cdc351a376e9cab /cli/CliOptionsParser.php
parent9faf2c1fa3c8c3ed82ff4c95733a018d0f9977a7 (diff)
Improve sharing via Print (#7728)
List of changes: * The temporary document for printing is now in an `<iframe>` instead of a new tab * The whole `<head>` element is copied to the temporary document, except for `<script>` tags to copy over the `<meta>` tags as well * URLs that contain the instance base URL are now removed from the printed PDF * The saved filename (PDF) will now default to the article title * `<details>` is auto expanded * Styling: * The main document's `<html>` class is copied over to preserve some styling that might use those classes * Instead of writing `content_el.innerHTML` to the temporary document, `content_el.outerHTML` is now written instead to apply the styles that select `.content` * `.dropdown-menu` is now hidden in the printed document, because it can't be expanded anyway * Headers and footers are hidden in the printed document * The printed document will now display correctly all the time, by waiting for it to load before calling `print()` * Before, the stylesheets might've not finished loading and the document was broken * Better browser support on mobile for this feature * Before, the document would fail to print on Chrome Mobile Tested on: * Firefox - both desktop and mobile, works ✅ * Chrome - both desktop and mobile, works ✅ * Opera - desktop, works (same as Chrome) ✅ * Brave - both desktop and mobile (same as Chrome), works ✅ * Safari - both desktop and mobile, works✅ * Microsoft Edge - both desktop and mobile, works ✅ * GNOME Web - desktop, works ✅ * SeaMonkey - desktop, works ✅ Known issues: * Images may not finish loading the first time the print dialog is opened TODO: * [x] Test on Safari * [x] Try to fix GNOME Web
Diffstat (limited to 'cli/CliOptionsParser.php')
0 files changed, 0 insertions, 0 deletions