Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
Rocket.Chat
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RocketChat
Rocket.Chat
Commits
bac59bee
Commit
bac59bee
authored
9 years ago
by
Rodrigo Nascimento
Browse files
Options
Downloads
Patches
Plain Diff
Remove iframely
parent
12aff632
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.meteor/versions
+0
-1
0 additions, 1 deletion
.meteor/versions
packages/rocketchat-oembed/oembed.coffee
+0
-41
0 additions, 41 deletions
packages/rocketchat-oembed/oembed.coffee
with
0 additions
and
42 deletions
.meteor/versions
+
0
−
1
View file @
bac59bee
...
...
@@ -32,7 +32,6 @@ html-tools@1.0.4
htmljs@1.0.4
http@1.1.0
id-map@1.0.3
iframely:oembed@0.0.2
iron:controller@1.0.8
iron:core@1.0.8
iron:dynamic-template@1.0.8
...
...
This diff is collapsed.
Click to expand it.
packages/rocketchat-oembed/oembed.coffee
deleted
100644 → 0
+
0
−
41
View file @
12aff632
###
# OEmbed is a temporary image and map embedder for bots development
# @param {Object} msg - The message object
# to be replaced by proper implementation in 1.0
###
# IframelyOembed.setEndpoint 'http://open.iframe.ly/api/oembed?api_key=' + Meteor.settings.public?.iframelyApiKey?
IframelyOembed
.
setCacheOptions
cacheTTL
:
1000
*
60
*
60
,
# Hour.
cacheErrorTTL
:
1000
*
60
,
# Minute.
cacheEnabled
:
true
class
OEmbed
constructor
:
(
message
)
->
console
.
log
"OEmbed constructor"
if
window
.
rocketDebug
message
.
urls
?
.
forEach
(
url
)
->
console
.
log
"OEmbed iframely.oembed"
,
url
if
window
.
rocketDebug
Meteor
.
call
'iframely.oembed'
,
url
,
(
error
,
data
)
=>
console
.
log
"OEmbed iframely.oembed callback"
,
error
,
data
if
window
.
rocketDebug
if
_
.
trim
data
.
html
message
.
html
=
message
.
html
+
data
.
html
# if _.trim message.msg
# picmatch = message.msg.match(/^https?:\/\/(?:[a-z0-9\-]+\.)+[a-z0-9]{2,6}(?:\/[^\/#?]+)+\.(?:jpe?g|gif|png)$/i)
# if picmatch?
# # inline style to limit code pollution
# console.log "OEmbed picmatch" if window.rocketDebug
# message.html = "<img style='width:400px;height:auto;' src='" + message.msg + "'></img>"
# else
# mapmatch = message.msg.match(/^https?\:\/\/maps\.(google|googleapis)\.[a-z]+\/maps\/api.*format=png$/i)
# if mapmatch?
# console.log "OEmbed mapmatch" if window.rocketDebug
# message.html = "<img style='width:400px;height:auto;' src='" + message.msg + "'></img>"
return
message
# RocketChat.callbacks.add 'renderMessage', OEmbed, RocketChat.callbacks.priority.HIGH
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment