So has this been merged yet?
Subtly dealing with whisper I think exisits hereā¦
So has this been merged yet?
Subtly dealing with whisper I think exisits hereā¦
Iām fixing my mistakes in the PR with help from @tgxworld and @zogstrip. Also we are discussing enabling by default with a small limit.
Anything up with this? I have an academic user who needs to export entire discussions for offline analysis.
We werenāt able to come up with anything we liked here, so we kinda put it on the back burner.
My solution is going to be a client-side parser thatāll take a topic URL and spit out something vaguely resembling in Mbox file.
First version is a go on Meta
Go to a long topic: The State of JavaScript on Android in 2015 is... poor
Press CTRL+P
The quote styling is a bit funky
Looks great!
Iāve noticed on Firefox that I sometimes get the browser-native print dialog pop up immediately, then your new popup window once I close the print dialog, and then the desired print dialog. I also noticed that the popup-blocker kicked in ā so is the keypress perhaps not prevent propagation of the event, and is it perhaps opening the popup after an async call, rather than as a direct result of the keypress?
Exactly. I couldnāt find a way to properly stop propagation on the print event. (it doesnāt look possible)
I donāt know if itās possible on the print event, but itās possible on the key combo. (I didnāt know there was a print event!) Note that you canāt use keypress
ā that only works in Firefox, as the other browsers seem to handle the default print in keydown
.
Hereās the super-simple approach:
https://jsfiddle.net/0kch2s63/2/
It works correctly in both Firefox and Chrome. Unfortunately in Edge you still get the printing popup ā but the event is handled appropriately. Not sure about Safari ā I donāt have a Mac on me at present.
This was happening indeed in earlier versions. Since this line got added, it doesnāt happen anymore with me on latest Firefox at Ubuntu Linux.
I tried an approach were we could re-use the CSS we have:
Not sure if itās the best way, but this way we doesnāt bloat the crawler version for bots and keep the style DRY.
One of the pages of our longest topic (157 pages long) on meta with quotes and oneboxes:
As requested, there is no UI for printing.
So any user can start to print by pressing CTRL+P when on a long topic. (This shortcut is show in our keyboard help)
For example, going to The State of JavaScript on Android in 2015 is... poor and pressing CTRL+P will open a popup with a print dialog asking to print 64 pages.
Nice work! I love this!
I donāt suppose there is a way to exclude certain (or all) html customizations from the javascriptless or print view, is there? Right now it shows up as a bulleted table of contents because itās not including the accompanying css, which we donāt want.
Example:
Sure you can! Or at least in theory. I havenāt had a chance to put it in practice yet though.
@media print {
.menu-primary-container { display: none }
}
You can also hide such things from the crawler using
body.crawler {
.menu-primary-container { display: none }
}
Edit: and by crawler, I mean the crawler view the print window seems to utilize. Google will still see your links as I donāt think it parses CSS to know what content it should index (I could be wrong on that though).
(This is off topic)
I think Google does do this, I remember some posts talking about how they detected font-color: #fffffe
on keyword stuffing as being too invisible to see.
There is actually a slight inconsistency in the crawler.html.erb
as it includes theme html, but doesnāt include theme css. (see here; compare with application.html.erb
which includes everything in discourse_stylesheet.html.erb
).
This means any custom html added by a theme will appear in the print (or other crawler-based views), but cannot be styled, or removed via styling.
Iāve made a pr to add theme styles to the crawler view.
cc @Falco
I wonder if what we want here is a specific css theme piece for crawler view, uneasy just adding the blanket app css here cause people need to think about this if the want to customize css in crawler view
Yes, I was thinking the same thing.
Although, including the theme css is arguably better than current state, which just includes the un-styled theme html.