js: only apply target="_blank" to IDE build

On the web, we want to be able to navigate between the various Pybricks
subdomains without opening new tabs. But Pybricks Code is treated as an
"app", we don't want links to open in Pybricks Code.
This commit is contained in:
David Lechner
2021-04-20 12:38:33 -05:00
parent 2aadc75f2c
commit d0bfbcb4d1
3 changed files with 2 additions and 5 deletions
@@ -1,3 +1,4 @@
// Since Pybricks Code is an "app", all external links get opened in new tab/window
// https://stackoverflow.com/a/62742435/1976323
$(document).ready(function () {
$('a[href^="http://"], a[href^="https://"]').not('a[class*=internal]').attr('target', '_blank');