Skip to content

Instantly share code, notes, and snippets.

@jibbius
Last active June 1, 2016 03:59
Show Gist options
  • Save jibbius/f4bfd4fd80392d6bccdf55823daa19a4 to your computer and use it in GitHub Desktop.
Save jibbius/f4bfd4fd80392d6bccdf55823daa19a4 to your computer and use it in GitHub Desktop.
javascript:(function(){var axureNodes = $axure.document.sitemap.rootNodes;var key = 'url';var normalisedAxureNodes = function getValues(obj, key) { var objects = []; for (var i in obj) { if (!obj.hasOwnProperty(i)) continue; if (typeof obj[i] == 'object') { objects = objects.concat(getValues(obj[i], key)); } else if (i == key) { objects.push(obj[i]); } } return objects;}(axureNodes, key);var myfilecontents = function buildTextFile(my_values){ var textfilecontents = ''; for (var i in my_values) { if(my_values[i] != '') textfilecontents += 'http://' + window.location.hostname + '/' + my_values[i] + '\n'; } return textfilecontents;}(normalisedAxureNodes);var url = 'data:text;charset=utf8,' + encodeURIComponent(myfilecontents);window.open(url, '_blank');window.focus();})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment