Spaces:
Paused
Paused
Download lib/oembed/google_forms_fallback_provider.rb from Rovatiana/LearnPulse: direct link, hf CLI and curl.
- Browser
- Download file 427 Bytes
-
https://huggingface.co/spaces/Rovatiana/LearnPulse/resolve/main/lib/oembed/google_forms_fallback_provider.rb
- Command line
-
hf download hf://spaces/Rovatiana/LearnPulse/lib/oembed/google_forms_fallback_provider.rb
-
curl -L -o google_forms_fallback_provider.rb https://huggingface.co/spaces/Rovatiana/LearnPulse/resolve/main/lib/oembed/google_forms_fallback_provider.rb
427 Bytes
| module Oembed | |
| class GoogleFormsFallbackProvider < BaseFallbackProvider | |
| def self.domains | |
| [/docs\.google\.com/] | |
| end | |
| def self.paths | |
| [ | |
| /^\/forms\/.*\/viewform/ | |
| ] | |
| end | |
| def resource_url | |
| if @resource_url.include?('embedded=true') | |
| @resource_url | |
| else | |
| full_path = @resource_url.split('?').first | |
| full_path + '?embedded=true' | |
| end | |
| end | |
| end | |
| end | |