Ennoying Print problem

User Help for Mozilla Firefox
Post Reply
[-WallyGator-]
Posts: 60
Joined: August 24th, 2005, 11:00 am

Ennoying Print problem

Post by [-WallyGator-] »

In FF 52.8.1 (64bit), when I Print (preview) pages for some sites, Links get the text-expanded URL next to it.
Tested it also in a Profile without any addons !

To be clear : I'm not talking about Headers / Footers !

Example from this site : http://www.floortex.com/UK_Home/Floorte ... 1215219ER/

Code: Select all


    Welcome
    Products
    Brands
    About Us
    Registered Resellers
    Support
    Floortex Matters
    Contact Us
    Trade

1215219ER

Home > UK Home > Floortex Products > Chairmats for Hard Floors > 1215219ER
becomes :

Code: Select all

Welcome (http://www.floortex.com/UK_Home/) Products(http://www.floortex.com/UK_Home/Floortex_Products/)
Brands(http://www.floortex.com/UK_Home/Product_Range/) About Us(http://www.floortex.com/UK_Home/About_Us/)
Registered Resellers(http://www.floortex.com/UK_Home/where_to_buy/)
Support(http://www.floortex.com/UK_Home/Support/)
Floortex Matters(http://www.floortex.com/UK_Home/News_and_Events/)
Contact Us(http://www.floortex.com/UK_Home/contact_us/) Trade(http://www.floortex.com/UK_Home/working_with_floortex/)

1215219ER

Home (http://www.floortex.com) > UK Home (http://www.floortex.com/UK_Home) > Floortex Products (http://www.floortex.com
/UK_Home/Floortex_Products) > Chairmats for Hard Floors (http://www.floortex.com/UK_Home/Floortex_Products
/Chairmats_for_Hard_Floors) > 1215219ER (http://www.floortex.com/UK_Home/Floortex_Products/Chairmats_for_Hard_F|oors
/1Z15219ER)
This is very ennoying and I didn't have that in the past (with my FF 52.x.x 32-bit)
Unfortunatly I can't remember when I started to have this. When I started using the 64-bit version or after an FF-update.

How can I get rid of that ? Couldn't find anything in options
User avatar
therube
Posts: 21703
Joined: March 10th, 2004, 9:59 pm
Location: Maryland USA

Re: Ennoying Print problem

Post by therube »

And change if your restart FF in Safe Mode?
Fire 750, bring back 250.
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball CopyURL+ FetchTextURL FlashGot NoScript
[-WallyGator-]
Posts: 60
Joined: August 24th, 2005, 11:00 am

Re: Ennoying Print problem

Post by [-WallyGator-] »

therube wrote:And change if your restart FF in Safe Mode?
Exactly the same
User avatar
jscher2000
Posts: 11742
Joined: December 19th, 2004, 12:26 am
Location: Silicon Valley, CA USA
Contact:

Re: Ennoying Print problem

Post by jscher2000 »

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
  • (Win) Ctrl+Shift+k
  • (Mac) Command+Alt+k
In the line at the bottom, paste the following script and press Return to submit it:

Code: Select all

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

If you need to do this often:

A bookmarklet could do the job with a little code tweakery.
[-WallyGator-]
Posts: 60
Joined: August 24th, 2005, 11:00 am

Re: Ennoying Print problem

Post by [-WallyGator-] »

@jscher2000

Thanks, that does the job. Tested it succesfully on 2 different URL's / sites giving that problem

I'm wondering :
1) why didn't I have that problem in the past ? Was FF doing something like that by default ?
2) is there a way to implement that so that it's always (automatically) active ? Via userChrome, via Stylus or ....... ?

Thanks
User avatar
jscher2000
Posts: 11742
Joined: December 19th, 2004, 12:26 am
Location: Silicon Valley, CA USA
Contact:

Re: Ennoying Print problem

Post by jscher2000 »

[-WallyGator-] wrote:I'm wondering :
1) why didn't I have that problem in the past ? Was FF doing something like that by default ?
2) is there a way to implement that so that it's always (automatically) active ? Via userChrome, via Stylus or ....... ?
1) Doubtful
2) Yes, try Stylish first. It's just this:

Code: Select all

@media print{
  a[href]:after {
    display:none !important;
  }
}
[-WallyGator-]
Posts: 60
Joined: August 24th, 2005, 11:00 am

Re: Ennoying Print problem

Post by [-WallyGator-] »

jscher2000 wrote: 2) Yes, try Stylish first. It's just this:
Thank you very very much !
Implemented it as-is in Stylus (not Stylish) and it works like a charm !
User avatar
jscher2000
Posts: 11742
Joined: December 19th, 2004, 12:26 am
Location: Silicon Valley, CA USA
Contact:

Re: Ennoying Print problem

Post by jscher2000 »

Whoops, read that wrong, and yes, Stylus is less troublesome than Stylish since Firefox 57.
Post Reply