This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function preventMultiTab(){ | |
if(window.BroadcastChannel){ | |
var tab_sid = (new Date()).getTime(); | |
sessionStorage.setItem('tab_sid', tab_sid); | |
var channel = new BroadcastChannel('tab-connections'); | |
channel.postMessage('ping:get_back_all_ids'); | |
channel.onmessage = function(e) { | |
var message = e.data.split(':'); | |
if(message[0]=='close'){ | |
if(tab_sid > parseInt(message[1])){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Define functions to render linked interactive plots using d3. | |
// Another script should define e.g. | |
// <script> | |
// var plot = new animint("#plot","path/to/plot.json"); | |
// </script> | |
// Constructor for animint Object. | |
var animint = function (to_select, json_file) { | |
var dirs = json_file.split("/"); | |
dirs.pop(); //if a directory path exists, remove the JSON file from dirs | |
var element = d3.select(to_select); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Define functions to render linked interactive plots using d3. | |
// Another script should define e.g. | |
// <script> | |
// var plot = new animint("#plot","path/to/plot.json"); | |
// </script> | |
// Constructor for animint Object. | |
var animint = function (to_select, json_file) { | |
var dirs = json_file.split("/"); | |
dirs.pop(); //if a directory path exists, remove the JSON file from dirs | |
var element = d3.select(to_select); |