mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
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:
@@ -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
|
||||
|
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user