mirror of
https://github.com/tcsenpai/Zundler.git
synced 2025-06-06 11:35:40 +00:00
Open external links in new tab
This commit is contained in:
parent
74fc46e1d9
commit
d5b30f9f52
@ -91,6 +91,10 @@ var fix_link = function(a) {
|
||||
a.addEventListener('click', virtual_click);
|
||||
} else if (a.getAttribute('href').startsWith('#')) {
|
||||
a.setAttribute('href', "about:srcdoc" + a.getAttribute('href'))
|
||||
} else {
|
||||
// External links should open in a new tab. Browsers block links to
|
||||
// sites of different origin within an iframe for security reasons.
|
||||
a.setAttribute('target', "_blank");
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user