Add gist embedding

This commit is contained in:
Jordan Bates 2013-04-30 10:17:48 -07:00
parent e92d0cd82c
commit f4affdacc2
7 changed files with 45 additions and 3 deletions

View File

@ -2,6 +2,7 @@ seaweedchan:
- Fix various embedding issues
- Fix Link Title depending on Embedding
- Added favicons to links that can be embedded
- Add gist embedding
### 1.1.4 - 2013-04-29
seaweedchan:

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -923,4 +923,8 @@ a:only-of-type > .remove {
.linkify.pastebin {
background: transparent url('data:image/png;base64,<%= grunt.file.read("src/General/img/links/pastebin.png", {encoding: "base64"}) %>') center left no-repeat!important;
padding-left: 18px;
}
.linkify.gist {
background: transparent url('data:image/png;base64,<%= grunt.file.read("src/General/img/links/gist.png", {encoding: "base64"}) %>') center left no-repeat!important;
padding-left: 18px;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 683 B

View File

@ -206,6 +206,13 @@ Linkify =
div = $.el 'iframe',
src: "http://pastebin.com/embed_iframe.php?i=#{@name}"
gist:
regExp: /.*(?:gist.github.com\/.*\/)([^#\&\?]*).*/
el: ->
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"
embedder: (a) ->
return [a] unless Conf['Link Title']
titles = {}