Amanda
Amanda

Reputation: 12737

How do I override a JS URL override?

I've noticed that I've I'm logged in to FB, and someone has posted a link, when I hover over it my status bar (at the bottom...that's status, right?) shows the URL for the story, but if I right click and say "copy link" the link is transformed into one with FB tracking attached. So for instance someone posted a Boston Review story. The screen and the hover text both show that the URL is:

http://www.bostonreview.net/BR37.4/junot_diaz_paula_moya_drown_race.php

But if I actually click the link or right click and say "copy link address" or "copy link location" the URL is transformed to something like this (I swapped in some x's):

http://www.facebook.com/l.php?u=http%3A%2F%2Fwww.bostonreview.net%2FBR37.4%2Fjunot_diaz_paula_moya_drown_race.php&h=wAQG1wXXXXXyoIDSg_ceA9JIXoBRD_o6XXXXXA0Llo4HA

I can use the element inspector to get around it, but I'm curious about whether I can disable that in other ways.

I realize this is only marginally a programming question, since I really just want to tweak my own browser behavior, but I'm not sure where else to ask.

Upvotes: 0

Views: 671

Answers (2)

C3roe
C3roe

Reputation: 96226

but I'm curious about whether I can disable that in other ways.

You could write your own user JavaScript / browser extension / bookmarklet, that goes through all the links on a page, and if their href has the right format extracts the u parameter and sets it as the new href …

Upvotes: 1

Niraj Shah
Niraj Shah

Reputation: 15457

You can't change links on Facebook. All links on Facebook go through their link tracking page. It's probably used by Facebook in a number of ways (user tracking, anti-virus etc). All links in Faceboo, whether through an app or posted by the user manually, will have this long URL passing through l.php.

Upvotes: 0

Related Questions