Skip to content

Commit

Permalink
Remove anon gist saving.
Browse files Browse the repository at this point in the history
  • Loading branch information
forresto committed Oct 28, 2022
1 parent b84aa4b commit 8c69c6d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 117 deletions.
15 changes: 5 additions & 10 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,23 @@ http://meemoo.org/
A data flow visual programming framework for browser audio/visual hacking.

by
Forrest Oliphant, http://forresto.com/
Forrest Oliphant, https://forresto.com/
with help from
Media Lab Helsinki, http://mlab.taik.fi/
NLnet Foundation, http://nlnet.nl/
The Shuttleworth Foundation, http://www.shuttleworthfoundation.org/
Mozilla/Eyebeam Open(Art), http://openart.eyebeam.org/

demo: http://meemoo.org/iframework
blog: http://meemoo.org/blog
demo: https://app.meemoo.org/
blog: https://meemoo.org/blog

---

meemoospeak : model : html5speak
------------+-------+--------------------------------------
app : graph : json, like graph={nodes:[],edges:[]}
module : node : iframe
wire : edge : window.postMessage()
module : node : iframe / web component
wire : edge : postMessage / custom event

---

Expand All @@ -40,11 +40,6 @@ You don’t have to do anything special to choose one license or the other and y

---

Donations:
Flattr: https://flattr.com/thing/183497/Meemoo-hackable-web-apps
Paypal: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=K7UYG9Y6XLHHS


_________________
/\ _____________ \
/ \ \___________/\ \
Expand Down
55 changes: 2 additions & 53 deletions build/meemoo-iframework.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions build/meemoo-iframework.min.js

Large diffs are not rendered by default.

53 changes: 1 addition & 52 deletions src/iframework.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ $(function(){
'<div class="savecontrols">'+
'<button class="savelocal icon-install">save local</button>'+
'<button class="forklocal icon-split" title="save as... copy app and save under a new name">fork</button>'+
'<button class="savegist icon-globe-1" title="save app to gist.github.com anonymously">save public</button>'+
'<a class="savegist button icon-globe-1" href="https://gist.github.com/?filename=app.meemoo.json" target="_blank" rel="noopener noreferrer" title="save app to gist.github.com">save public</button>'+
'<button class="deletelocal icon-trash" title="delete local app"></button>'+
'</div>'+
'<div class="permalink" title="last publicly saved version">'+
Expand Down Expand Up @@ -73,7 +73,6 @@ $(function(){
"click .newblank": "newBlank",

"submit .loadfromgist": "loadFromGist",
"click .savegist": "saveGist",
"click .savelocal": "saveLocal",
"click .forklocal": "forkLocal",
"click .deletelocal": "deleteLocal",
Expand Down Expand Up @@ -362,56 +361,6 @@ $(function(){

return gistid;
},
saveGist: function () {
// Save app to gist
var graph = this.graph.toJSON();
var data = {
"description": "meemoo app: "+graph["info"]["title"],
"public": true
};
data["files"] = {};
var filename = graph["info"]["url"]+".json";
data["files"][filename] = {
"content": JSON.stringify(graph, null, " ")
};

// Button
this.$(".savegist")
.prop('disabled', true)
.text("saving...");

$.ajax({
url: 'https://api.github.com/gists',
type: 'POST',
dataType: 'json',
data: JSON.stringify(data)
})
.done(function(e){
// Save gist url to graph's info.parents
var info = Iframework.graph.get("info");
if (!info.hasOwnProperty("parents") || !info.parents.push) {
graph.info.parents = [];
}
graph.info.parents.push(e.html_url);
// Save local with new gist reference
Iframework.saveLocal();
// Show new permalink
Iframework.updateCurrentInfo();

Iframework.analyze("save", "gist", e.id);
})
.fail(function(e){
var description = "meemoo app: " + Iframework.graph.toJSON()["info"]["title"];
Iframework.$(".permalink").html('api is down (;_;) copy your app source code to <a href="https://gist.github.com/?description='+encodeURIComponent(description)+'" target="_blank">gist.github.com</a>');
console.warn("gist save error", e);
})
.always(function(e){
// Button
this.$(".savegist")
.prop('disabled', false)
.text("save public");
});
},
loadLocalApps: function () {
// Load apps from local storage
this._localApps = new Iframework.LocalApps();
Expand Down

0 comments on commit 8c69c6d

Please sign in to comment.