📜 ⬆️ ⬇️

We print Yandex.Maps in Mozilla Firefox full page

For some reason, I always scolded Ya.Karta for the fact that they are very finely printed.
It turned out that if you do not use the “Print” link, but simply print the page with the map itself (“preview”), it turns out quite well: the map is displayed in full width and the only thing that spoils the picture is a large strip with the logo at the top:
image

In order to use the entire usable space in full, we just need to hide the logo for the printed version with styles (Yandex will not lose, there’s one left in the lower left corner;)) and raise the map back to the top (all the rest will hide the Ya.Kartovsky printed styles ).

To do this, in the folder “c: \ Documents and Settings \ user \ Application Data \ Mozilla \ Firefox \ Profiles \ xxxxxx.default \ chrome \” (everyone has their own, of course) you need to create two files:
one is userContent.css with the contents:
@import url(printHacks.css) print;

And, accordingly, printHacks.css itself:
@-moz-document domain("maps.yandex.ru") {
.l-page-m {
top: 0 !important;
}
.b-head-logo {
display: none;
}
}

Theoretically, the syntax allows you to stuff everything at once into userContent.css, but in practice it somehow does not work, but it works with import .
')
To activate, you just need to restart Firefox, the hack itself will be picked up for all pages of maps.yandex.ru:
image

PS: by the way, now you can write styles for any sites in printHacks.css, and they will only work when printed.

Source: https://habr.com/ru/post/67778/


All Articles