Browse Source
Update external links behaviour comment
merge-requests/14/head
Ivan Fonseca
8 years ago
No known key found for this signature in database
GPG Key ID: 95A9C856EC788689
1 changed files with
1 additions and
1 deletions
-
tildes/static/js/behaviors/external-links-new-tabs.js
|
|
@ -1,5 +1,5 @@ |
|
|
$.onmount('[data-js-external-links-new-tabs]', function() { |
|
|
$.onmount('[data-js-external-links-new-tabs]', function() { |
|
|
// Make all links in comment open in new tab
|
|
|
|
|
|
|
|
|
// Make links in the text open in a new tab
|
|
|
$(this).find( |
|
|
$(this).find( |
|
|
'a[href^="http"]' + // Select external links
|
|
|
'a[href^="http"]' + // Select external links
|
|
|
':not([href*="tildes.net"])' // But not links to tildes
|
|
|
':not([href*="tildes.net"])' // But not links to tildes
|
|
|
|