Skip to content
Browse files

yet more cleanup

  • Loading branch information...
1 parent 253ff8d commit 8fb9f3d42a41acd7c7a3d11c878a7ca0c6c51ace Carlos Scheidegger committed Mar 20, 2013
Showing with 4 additions and 22 deletions.
  1. +4 −22 htdocs/share.js
View
26 htdocs/share.js
@@ -1,31 +1,13 @@
-function getURLParameter(name) {
- return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search)||[,""])[1].replace(/\+/g, '%20'))||null;
-}
-
-function transpose(ar) {
- return _.map(_.range(ar[0].length), function(i) {
- return _.map(ar, function(lst) { return lst[i]; });
- });
-}
-
-// FIXME shell has a ton of repeated code... this is horribly horribly ugly
function share_init() {
+ function getURLParameter(name) {
+ return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search)||[,""])[1].replace(/\+/g, '%20'))||null;
+ }
+
$("#instashare-view-source").click(function() {
document.location = "main.html" + location.search;
});
rclient = RClient.create("ws://"+location.hostname+":8081/", function() {
rcloud.init_client_side_data();
- var that = this;
- var shell_objtypes = ["scatterplot", "iframe", "facet_osm_plot", "facet_tour_plot"];
- for (var i=0; i<shell_objtypes.length; ++i) {
- (function(objtype) {
- that.register_handler(objtype, function(data) {
- var div = shell.handle(objtype, data);
- shell.post_div(div);
- // shell.handle(objtype, data);
- });
- })(shell_objtypes[i]);
- }
var user = getURLParameter("user");
var filename = getURLParameter("filename");
shell.load_from_file(user, filename, function() {

0 comments on commit 8fb9f3d

Please sign in to comment.
Something went wrong with that request. Please try again.