Let's just add some CoffeeScript flavor where possible <3
This commit is contained in:
parent
3384c1b362
commit
c325b9eeda
@ -4594,12 +4594,12 @@
|
||||
api: function(uid) {
|
||||
return "https://api.github.com/gists/" + uid;
|
||||
},
|
||||
text: function(data) {
|
||||
var file, response;
|
||||
text: function(_arg) {
|
||||
var file, files;
|
||||
|
||||
response = data.files;
|
||||
for (file in response) {
|
||||
if (response.hasOwnProperty(file)) {
|
||||
files = _arg.files;
|
||||
for (file in files) {
|
||||
if (files.hasOwnProperty(file)) {
|
||||
return file;
|
||||
}
|
||||
}
|
||||
@ -4662,8 +4662,11 @@
|
||||
api: function(uid) {
|
||||
return "//soundcloud.com/oembed?show_artwork=false&&maxwidth=500px&show_comments=false&format=json&url=https://www.soundcloud.com/" + uid;
|
||||
},
|
||||
text: function(data) {
|
||||
return data.title;
|
||||
text: function(_arg) {
|
||||
var title;
|
||||
|
||||
title = _arg.title;
|
||||
return title;
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -4708,8 +4711,11 @@
|
||||
api: function(uid) {
|
||||
return "https://vimeo.com/api/oembed.json?url=http://vimeo.com/" + uid;
|
||||
},
|
||||
text: function(data) {
|
||||
return data.title;
|
||||
text: function(_arg) {
|
||||
var title;
|
||||
|
||||
title = _arg.title;
|
||||
return title;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@ -4599,12 +4599,12 @@
|
||||
api: function(uid) {
|
||||
return "https://api.github.com/gists/" + uid;
|
||||
},
|
||||
text: function(data) {
|
||||
var file, response;
|
||||
text: function(_arg) {
|
||||
var file, files;
|
||||
|
||||
response = data.files;
|
||||
for (file in response) {
|
||||
if (response.hasOwnProperty(file)) {
|
||||
files = _arg.files;
|
||||
for (file in files) {
|
||||
if (files.hasOwnProperty(file)) {
|
||||
return file;
|
||||
}
|
||||
}
|
||||
@ -4667,8 +4667,11 @@
|
||||
api: function(uid) {
|
||||
return "//soundcloud.com/oembed?show_artwork=false&&maxwidth=500px&show_comments=false&format=json&url=https://www.soundcloud.com/" + uid;
|
||||
},
|
||||
text: function(data) {
|
||||
return data.title;
|
||||
text: function(_arg) {
|
||||
var title;
|
||||
|
||||
title = _arg.title;
|
||||
return title;
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -4713,8 +4716,11 @@
|
||||
api: function(uid) {
|
||||
return "https://vimeo.com/api/oembed.json?url=http://vimeo.com/" + uid;
|
||||
},
|
||||
text: function(data) {
|
||||
return data.title;
|
||||
text: function(_arg) {
|
||||
var title;
|
||||
|
||||
title = _arg.title;
|
||||
return title;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@ -257,9 +257,8 @@ Linkify =
|
||||
src: "http://www.purplegene.com/script?url=https://gist.github.com/#{a.dataset.uid}.js"
|
||||
title:
|
||||
api: (uid) -> "https://api.github.com/gists/#{uid}"
|
||||
text: (data) ->
|
||||
response = data.files
|
||||
return file for file of response when response.hasOwnProperty file
|
||||
text: ({files}) ->
|
||||
return file for file of files when files.hasOwnProperty file
|
||||
|
||||
image:
|
||||
regExp: /(http|www).*\.(gif|png|jpg|jpeg|bmp)$/
|
||||
@ -301,7 +300,7 @@ Linkify =
|
||||
div
|
||||
title:
|
||||
api: (uid) -> "//soundcloud.com/oembed?show_artwork=false&&maxwidth=500px&show_comments=false&format=json&url=https://www.soundcloud.com/#{uid}"
|
||||
text: (data) -> data.title
|
||||
text: ({title}) -> title
|
||||
|
||||
TwitchTV:
|
||||
regExp: /.*(?:twitch.tv\/)([^#\&\?]*).*/
|
||||
@ -342,7 +341,7 @@ Linkify =
|
||||
src: "//player.vimeo.com/video/#{a.dataset.uid}?wmode=opaque"
|
||||
title:
|
||||
api: (uid) -> "https://vimeo.com/api/oembed.json?url=http://vimeo.com/#{uid}"
|
||||
text: (data) -> data.title
|
||||
text: ({title}) -> title
|
||||
|
||||
Vine:
|
||||
regExp: /.*(?:vine.co\/)([^#\&\?]*).*/
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user