-
-
Save evantill/ea9f815fec060a3795fe to your computer and use it in GitHub Desktop.
onebox plugin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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