Fixed details breaking page margins on print

This commit is contained in:
squidfunk 2021-05-15 14:07:34 +02:00
parent 86c05e84a3
commit 920f11cf6e
7 changed files with 12 additions and 17 deletions

View File

@ -223,7 +223,7 @@
</script>
{% endblock %}
{% block scripts %}
<script src="{{ 'assets/javascripts/bundle.bf05ca82.min.js' | url }}"></script>
<script src="{{ 'assets/javascripts/bundle.3d775e71.min.js' | url }}"></script>
{% for path in config["extra_javascript"] %}
<script src="{{ path | url }}"></script>
{% endfor %}

View File

@ -35,5 +35,5 @@
{% endblock %}
{% block scripts %}
{{ super() }}
<script src="{{ 'overrides/assets/javascripts/bundle.76b3621f.min.js' | url }}"></script>
<script src="{{ 'overrides/assets/javascripts/bundle.a8d8885a.min.js' | url }}"></script>
{% endblock %}

View File

@ -24,11 +24,9 @@ import {
NEVER,
Observable,
fromEvent,
fromEventPattern,
merge
fromEventPattern
} from "rxjs"
import {
filter,
mapTo,
startWith,
switchMap
@ -66,10 +64,7 @@ export function watchMedia(query: string): Observable<boolean> {
* @returns Print mode observable
*/
export function watchPrint(): Observable<void> {
return merge(
watchMedia("print").pipe(filter(Boolean)), /* Webkit */
fromEvent(window, "beforeprint") /* IE, FF */
)
return fromEvent(window, "beforeprint")
.pipe(
mapTo(undefined)
)