Show the real URL for an outgoing link in status bar (bug 526373)
This commit is contained in:
Родитель
d028f535cf
Коммит
03958c7e5e
|
@ -0,0 +1,25 @@
|
|||
|
||||
// Show the actual URL of outgoing links in the status bar.
|
||||
// e.g. http://outgoing.mozilla.org/v1/b2d58f443178ce1de2ef80bb57dcc80211232c8b/http%3A//wvtc.net/
|
||||
// ...will display as http://wvtc.net/
|
||||
//
|
||||
setTimeout(function() {
|
||||
$(document).ready(function() {
|
||||
$('a[href^="http://outgoing.mozilla.org"]').each(function(e) {
|
||||
var $a = $(this),
|
||||
outgoing = $a.attr('href'),
|
||||
dest = unescape(outgoing.split('/').slice(5).join('/'));
|
||||
// Change it to the real destination:
|
||||
$a.attr('href', dest);
|
||||
$a.click(function(e) {
|
||||
// Change it to the outgoing URL:
|
||||
$a.attr('href', outgoing);
|
||||
setTimeout(function() {
|
||||
// Put back the real destination:
|
||||
$a.attr('href', dest);
|
||||
}, 100);
|
||||
return true;
|
||||
});
|
||||
});
|
||||
});
|
||||
}, 50);
|
|
@ -393,6 +393,9 @@ MINIFY_BUNDLES = {
|
|||
|
||||
# Users
|
||||
'js/zamboni/users.js',
|
||||
|
||||
# Fix-up outgoing links
|
||||
'js/zamboni/outgoing_links.js',
|
||||
),
|
||||
'zamboni/discovery-pane': (
|
||||
'js/zamboni/jquery-1.4.2.min.js',
|
||||
|
|
Загрузка…
Ссылка в новой задаче