Merge branch 'v3' of https://github.com/zixaphir/appchan-x
This commit is contained in:
commit
5ada68f26f
@ -336,7 +336,7 @@
|
||||
i = this.length;
|
||||
while (i--) {
|
||||
if (this[i] === object) {
|
||||
break;
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return i;
|
||||
@ -350,6 +350,7 @@
|
||||
arg = args[_i];
|
||||
this.push.apply(this, arg);
|
||||
}
|
||||
return this;
|
||||
};
|
||||
|
||||
Array.prototype.remove = function(object) {
|
||||
@ -4325,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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@ -333,7 +333,7 @@
|
||||
i = this.length;
|
||||
while (i--) {
|
||||
if (this[i] === object) {
|
||||
break;
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return i;
|
||||
@ -347,6 +347,7 @@
|
||||
arg = args[_i];
|
||||
this.push.apply(this, arg);
|
||||
}
|
||||
return this;
|
||||
};
|
||||
|
||||
Array.prototype.remove = function(object) {
|
||||
@ -4321,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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@ -315,7 +315,7 @@
|
||||
i = this.length;
|
||||
while (i--) {
|
||||
if (this[i] === object) {
|
||||
break;
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return i;
|
||||
@ -329,6 +329,7 @@
|
||||
arg = args[_i];
|
||||
this.push.apply(this, arg);
|
||||
}
|
||||
return this;
|
||||
};
|
||||
|
||||
Array.prototype.remove = function(object) {
|
||||
@ -4324,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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@ -16,14 +16,14 @@ Array::contains = (object) ->
|
||||
Array::indexOf = (object) ->
|
||||
i = @length
|
||||
while i--
|
||||
break if @[i] is object
|
||||
return i if @[i] is object
|
||||
return i
|
||||
|
||||
Array::pushArrays = ->
|
||||
args = arguments
|
||||
for arg in args
|
||||
@push.apply @, arg
|
||||
return
|
||||
return @
|
||||
|
||||
Array::remove = (object) ->
|
||||
if (index = @indexOf object) > -1
|
||||
|
||||
@ -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