Open a0m0rajab opened 3 weeks ago
Note in the comment it's suggested that the print function would be a good usage, yet it does not show the full text (which was the same issue with playwright)
Here is the related page: https://www.typescriptlang.org/docs/handbook/2/modules.html
The print generated from the CTRL + P (on chrome browser, Version 127.0.6533.120 (Official Build) (64-bit), windows)
The missing text: The JavaScript specification declares that any JavaScript files without an import declaration, export, or top-level await should be considered a script and not a module.
The docs:
I think that search docs and some other tags should not be visible on the print document.
Related issue: https://github.com/microsoft/TypeScript-Website/issues/620
Workaround: I did remove the navbar, and extra information from the page which helped to have a better look for the printing and get the text here is the result:
After:
Before:
Javascript code to remove the extra elements from the webpage:
document.querySelectorAll("header, #page-helpful-popup, #site-footer, .whitespace-tight.raised").forEach(e => {
e.remove()
})
Using print query and break points would improve the experience:
Examples: https://stackoverflow.com/questions/1664049/can-i-force-a-page-break-in-html-printing https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_media_queries/Printing#using_media_queries_and_page_to_control_printed_content\ https://stackoverflow.com/questions/355313/how-do-i-hide-an-element-when-printing-a-web-page
Note: i tried to run the website and have a minimal working example as proof of concept but was not able to run the website locally, might visit this later.
The website worked on ubuntu but did not work on windows.
I did not find a better place to share this (would appreciate to point me to where should I publish it if it's not the correct place)
I was trying to find the PDF of the handbook for couple of reasons:
Yet I found that it was removed from the website for simplicity reasons. Is there any new decision about this?
Related issue: https://github.com/microsoft/TypeScript-Website/pull/2619#issuecomment-1331128079