搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

WYSIWYG printing in Firefox without showing expanded link addresses?

  • 5 个回答
  • 1 人有此问题
  • 80 次查看
  • 最后回复者为 cor-el

more options

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.

被采纳的解决方案

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

定位到答案原位置 👍 1

所有回复 (5)

more options

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

more options

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.

more options

选择的解决方案

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

more options

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?

more options

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)})();