diff --git a/builds/4chan-X.js b/builds/4chan-X.js index 8832fd096..ad12d3832 100644 --- a/builds/4chan-X.js +++ b/builds/4chan-X.js @@ -4305,6 +4305,16 @@ return JSON.parse(this.responseText).title; } } + }, + pastebin: { + regExp: /.*(?:pastebin.com\/)([^#\&\?]*).*/, + el: function() { + var div; + + return div = $.el('iframe', { + src: "http://pastebin.com/embed_iframe.php?i=" + this.name + }); + } } }, embedder: function(a) { diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index 8e098335b..7839b12e0 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -4301,6 +4301,16 @@ return JSON.parse(this.responseText).title; } } + }, + pastebin: { + regExp: /.*(?:pastebin.com\/)([^#\&\?]*).*/, + el: function() { + var div; + + return div = $.el('iframe', { + src: "http://pastebin.com/embed_iframe.php?i=" + this.name + }); + } } }, embedder: function(a) { diff --git a/builds/crx/script.js b/builds/crx/script.js index e303a2ef6..db053f8bf 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -4304,6 +4304,16 @@ return JSON.parse(this.responseText).title; } } + }, + pastebin: { + regExp: /.*(?:pastebin.com\/)([^#\&\?]*).*/, + el: function() { + var div; + + return div = $.el('iframe', { + src: "http://pastebin.com/embed_iframe.php?i=" + this.name + }); + } } }, embedder: function(a) { diff --git a/src/Linkification/Linkify.coffee b/src/Linkification/Linkify.coffee index 151585bf2..95cd856e5 100644 --- a/src/Linkification/Linkify.coffee +++ b/src/Linkification/Linkify.coffee @@ -199,6 +199,11 @@ Linkify = api: -> "//soundcloud.com/oembed?show_artwork=false&&maxwidth=500px&show_comments=false&format=json&url=https://www.soundcloud.com/#{@name}" text: -> JSON.parse(@responseText).title + pastebin: + regExp: /.*(?:pastebin.com\/)([^#\&\?]*).*/ + el: -> + div = $.el 'iframe', + src: "http://pastebin.com/embed_iframe.php?i=#{@name}" embedder: (a) -> return [a] unless Conf['Embedding']