diff options
author | root <root@socioambiental.org> | 2013-10-15 11:38:54 -0300 |
---|---|---|
committer | root <root@socioambiental.org> | 2013-10-15 11:38:54 -0300 |
commit | e2a1b968d674d36edca7d8ccda6e3ad48b57e34d (patch) | |
tree | 6926207115efcacd7a47e6a8cd77bee7825518fb | |
parent | 6679d0460fc88847c492dd13761180fcc1377b51 (diff) | |
download | timelinejs-e2a1b968d674d36edca7d8ccda6e3ad48b57e34d.tar.gz timelinejs-e2a1b968d674d36edca7d8ccda6e3ad48b57e34d.tar.bz2 |
Adding MakeMenuLinksOpenInNewWindow()
-rw-r--r-- | timelinejs.tpl.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/timelinejs.tpl.php b/timelinejs.tpl.php index eeb2f97..e3e1175 100644 --- a/timelinejs.tpl.php +++ b/timelinejs.tpl.php @@ -12,6 +12,15 @@ font: "<?php print $font; ?>", lang: "<?php print $lang; ?>" } + +function MakeMenuLinksOpenInNewWindow() { + var links = document.getElementsByTagName("a"); + for (var i = 0; i < links.length; i++) { + if (links[i].href != "http://widgets.socioambiental.org/") + links[i].target = "_parent"; + } +} +MakeMenuLinksOpenInNewWindow(); </script> <script type="text/javascript" src="/<?php print $library_path; ?>/compiled/js/storyjs-embed.js"></script> <!-- END Timeline Embed --> |