Skip to content

born2c0de/twitter-redirect-fixer

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

Twitter Redirect Fixer

The Opera extension is available here.

Although the URL points to Twitter's redirection service (t.co), Twitter includes the original link under the 'data-expanded-url' attribute in the A tag. If the shared link belongs to a third-party URL shortener, Twitter deferences it and includes the original link under the 'data-ultimate-url' attribute in the A tag.

Thanks to that, all I need to do is look for the 'data-ultimate-url' attribute for a link and replace the href with that. If the ultimate-url is not found, I use 'data-expanded-url' instead.

Porting to other Browsers

This extension can be improved by swapping 'mouseover' with 'mouseenter'. Although the 'mouseenter' event has been present in the W3C specs for almost 10 years, as of July 27 2013, only Opera(Presto) and IE support it. (and you thought Firefox, Chrome and Safari cared about web standards)

About

Removes redirection on Twitter. (Opera Extension)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published