gist title link
This commit is contained in:
parent
ef3c862543
commit
fb3d995b11
@ -4326,6 +4326,21 @@
|
||||
return div = $.el('iframe', {
|
||||
src: "http://www.purplegene.com/script?url=https://gist.github.com/" + this.name + ".js"
|
||||
});
|
||||
},
|
||||
title: {
|
||||
api: function() {
|
||||
return "https://api.github.com/gists/" + this.name;
|
||||
},
|
||||
text: function() {
|
||||
var file, response;
|
||||
|
||||
response = JSON.parse(this.responseText).files;
|
||||
for (file in response) {
|
||||
if (response.hasOwnProperty(file)) {
|
||||
return file;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@ -4322,6 +4322,21 @@
|
||||
return div = $.el('iframe', {
|
||||
src: "http://www.purplegene.com/script?url=https://gist.github.com/" + this.name + ".js"
|
||||
});
|
||||
},
|
||||
title: {
|
||||
api: function() {
|
||||
return "https://api.github.com/gists/" + this.name;
|
||||
},
|
||||
text: function() {
|
||||
var file, response;
|
||||
|
||||
response = JSON.parse(this.responseText).files;
|
||||
for (file in response) {
|
||||
if (response.hasOwnProperty(file)) {
|
||||
return file;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@ -4325,6 +4325,21 @@
|
||||
return div = $.el('iframe', {
|
||||
src: "http://www.purplegene.com/script?url=https://gist.github.com/" + this.name + ".js"
|
||||
});
|
||||
},
|
||||
title: {
|
||||
api: function() {
|
||||
return "https://api.github.com/gists/" + this.name;
|
||||
},
|
||||
text: function() {
|
||||
var file, response;
|
||||
|
||||
response = JSON.parse(this.responseText).files;
|
||||
for (file in response) {
|
||||
if (response.hasOwnProperty(file)) {
|
||||
return file;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@ -212,6 +212,11 @@ Linkify =
|
||||
div = $.el 'iframe',
|
||||
# Github doesn't allow embedding straight from the site, so we use an external site to bypass that.
|
||||
src: "http://www.purplegene.com/script?url=https://gist.github.com/#{@name}.js"
|
||||
title:
|
||||
api: -> "https://api.github.com/gists/#{@name}"
|
||||
text: ->
|
||||
response = JSON.parse(@responseText).files
|
||||
return file for file of response when response.hasOwnProperty file
|
||||
|
||||
embedder: (a) ->
|
||||
return [a] unless Conf['Link Title']
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user