X
Nhấn vào đây để đến phiên bản di động của trang web.

Diễn đàn trợ giúp

WYSIWYG printing in Firefox without showing expanded link addresses?

Được đăng

Cannot get Firefox to print or print preview without expanding all link addresses. Sorry this section so short but fourth time typing due to page errors and hangs at adding file image.

Cannot get Firefox to print or print preview without expanding all link addresses. Sorry this section so short but fourth time typing due to page errors and hangs at adding file image.

Giải pháp được chọn

That is a feature of a print style sheet in the website. Unfortunately, it is not always easy to defeat a print style sheet because those links are generated during print and not actually something you can pull out of the page.

You can override the generated content rule as follows. Not convenient, but tolerable for the occasional use:

You can use Firefox's Web Console to inject a new superseding style rule into the page. You can open the Web Console in the lower part of the tab using either:

  • "3-bar" menu button > Web Developer > Web Console
  • (menu bar) Tools > Web Developer > Web Console
  • (mac) Command+Alt+k

In the line at the bottom, paste the following script and press Return to submit it:

r='@media print{a[href]:after {display:none !important}}'; var s=document.createElement('style'); s.appendChild(document.createTextNode(r)); document.body.appendChild(s);

It's normal for Firefox to warn you not to run scripts from strangers the first time you do this. You may need to complete a task to demonstrate that you were warned.

When you call up print preview after that, the unwanted link text should be gone.

For reference:

If you're curious how a style rule can insert text into a document, this article on MDN has more information: https://developer.mozilla.org/docs/Web/CSS/::after

Đọc câu trả lời này trong ngữ cảnh 1

Chi tiết hệ thống bổ sung

Ứng dụng

  • Chuỗi đại diện người dùng: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:56.0) Gecko/20100101 Firefox/56.0

Thông tin chi tiết

Người tạo câu hỏi

Here are the images which would not load on the combined questions entry/ account creation page.

Here are the images which would not load on the combined questions entry/ account creation page.
Shadow110 1072 giải pháp 14836 câu trả lời
Được đăng

HI most sites have a print friendly button to click so that you do not get all of those links. You can try the below to see if can do anything.

Please let us know if this solved your issue or if need further assistance.

HI most sites have a print friendly button to click so that you do not get all of those links. You can try the below to see if can do anything. *http://kb.mozillazine.org/Problems_printing_web_pages *https://support.mozilla.org/en-US/kb/fix-printing-problems-firefox Please let us know if this solved your issue or if need further assistance.
jscher2000
  • Top 10 Contributor
8775 giải pháp 71736 câu trả lời
Được đăng

Giải pháp được chọn

That is a feature of a print style sheet in the website. Unfortunately, it is not always easy to defeat a print style sheet because those links are generated during print and not actually something you can pull out of the page.

You can override the generated content rule as follows. Not convenient, but tolerable for the occasional use:

You can use Firefox's Web Console to inject a new superseding style rule into the page. You can open the Web Console in the lower part of the tab using either:

  • "3-bar" menu button > Web Developer > Web Console
  • (menu bar) Tools > Web Developer > Web Console
  • (mac) Command+Alt+k

In the line at the bottom, paste the following script and press Return to submit it:

r='@media print{a[href]:after {display:none !important}}'; var s=document.createElement('style'); s.appendChild(document.createTextNode(r)); document.body.appendChild(s);

It's normal for Firefox to warn you not to run scripts from strangers the first time you do this. You may need to complete a task to demonstrate that you were warned.

When you call up print preview after that, the unwanted link text should be gone.

For reference:

If you're curious how a style rule can insert text into a document, this article on MDN has more information: https://developer.mozilla.org/docs/Web/CSS/::after

That is a feature of a print style sheet in the website. Unfortunately, it is not always easy to defeat a print style sheet because those links are generated during print and not actually something you can pull out of the page. You can override the generated content rule as follows. Not convenient, but tolerable for the occasional use: You can use Firefox's Web Console to inject a new superseding style rule into the page. You can open the Web Console in the lower part of the tab using either: * "3-bar" menu button > Web Developer > Web Console * (menu bar) Tools > Web Developer > Web Console * (mac) Command+Alt+k In the line at the bottom, paste the following script and press Return to submit it: <code>r='@media print{a[href]:after {display:none !important}}'; var s=document.createElement('style'); s.appendChild(document.createTextNode(r)); document.body.appendChild(s); </code> It's normal for Firefox to warn you not to run scripts from strangers the first time you do this. You may need to complete a task to demonstrate that you were warned. When you call up print preview after that, the unwanted link text should be gone. ''For reference:'' If you're curious how a style rule can insert text into a document, this article on MDN has more information: https://developer.mozilla.org/docs/Web/CSS/::after

Người tạo câu hỏi

Yes! A technical solution to a problem created by crappy technology--love it. Having barely passable programming skills myself even as a script-kiddie, could I ask if there is a way to (save it) run/inject the script from a bookmark such as prefixing it with "javascript:" or other such protocol command?

Yes! A technical solution to a problem created by crappy technology--love it. Having barely passable programming skills myself even as a script-kiddie, could I ask if there is a way to (save it) run/inject the script from a bookmark such as prefixing it with "javascript:" or other such protocol command?
cor-el
  • Top 10 Contributor
  • Moderator
17540 giải pháp 158604 câu trả lời
Được đăng

Câu trả lời hữu ích

I normally place such script files in the head section and give them an 'id' to make it easy to toggle with another bookmarklet.

javascript:(function(){var nS=document.createElement('style'),r='@media print{a[href]::after {display:none!important}}';nS.id='style_!!!';nS.setAttribute('type','text/css');nS.textContent=r;document.querySelector('head,body').appendChild(nS)})();
I normally place such script files in the head section and give them an 'id' to make it easy to toggle with another bookmarklet. <pre><nowiki>javascript:(function(){var nS=document.createElement('style'),r='@media print{a[href]::after {display:none!important}}';nS.id='style_!!!';nS.setAttribute('type','text/css');nS.textContent=r;document.querySelector('head,body').appendChild(nS)})();</nowiki></pre>