FEATURE: Inline (Mini) Oneboxing

see:
https://meta.discourse.org/t/mini-inline-onebox-support-rfc/66400?source_topic_id=66066
This commit is contained in:
Robin Ward
2017-07-19 15:08:54 -04:00
parent 44fb2a2833
commit 3882722195
18 changed files with 306 additions and 8 deletions

View File

@@ -1,3 +1,5 @@
require_dependency 'inline_oneboxer'
module PrettyText
module Helpers
extend self
@@ -43,6 +45,10 @@ module PrettyText
end
end
def lookup_inline_onebox(url)
InlineOneboxer.lookup(url)
end
def get_topic_info(topic_id)
return unless topic_id.is_a?(Integer)
# TODO this only handles public topics, secured one do not get this

View File

@@ -49,6 +49,10 @@ function __getURL(url) {
return url;
}
function __lookupInlineOnebox(url) {
return __helpers.lookup_inline_onebox(url);
}
function __getTopicInfo(i) {
return __helpers.get_topic_info(i);
}