Skip to content

Instantly share code, notes, and snippets.

@evantill
Created June 12, 2015 11:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save evantill/ea9f815fec060a3795fe to your computer and use it in GitHub Desktop.
Save evantill/ea9f815fec060a3795fe to your computer and use it in GitHub Desktop.
onebox plugin
# name: clashCaller
# about: Uses the clashCaller plugin to display clash caller war plan.
# version: 1.0.0
# authors: Eric Vantillard
# url: https://github.com/discourse/discourse/tree/master/plugins/lazyYT
class Onebox::Engine::ClashCallerOnebox
include Onebox::Engine
matches_regexp /^https?:\/\/(?:www\.)?(?:clashcaller.com\/war)\/.+$/
def to_html
url = @url.split('&').first
"<iframe src='#{url}&rm=minimal' style='border: 0' width='800' height='600' frameborder='0' scrolling='no' ></iframe>"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment