mirror of
https://github.com/pybricks/pybricks-api.git
synced 2026-09-12 17:46:19 +00:00
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.
6 lines
269 B
JavaScript
6 lines
269 B
JavaScript
// 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');
|
|
});
|