mirror of https://github.com/freeCodeCamp/devdocs
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
598 B
25 lines
598 B
11 years ago
|
module Docs
|
||
|
class Mdn < UrlScraper
|
||
|
self.abstract = true
|
||
|
self.type = 'mdn'
|
||
|
|
||
|
params[:raw] = 1
|
||
|
params[:macros] = 1
|
||
|
|
||
|
html_filters.push 'mdn/clean_html'
|
||
|
text_filters.insert_before 'attribution', 'mdn/contribute_link'
|
||
|
|
||
|
options[:trailing_slash] = false
|
||
|
options[:attribution] = <<-HTML.strip_heredoc
|
||
|
© 2013 Mozilla Contributors<br>
|
||
|
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
|
||
|
HTML
|
||
|
|
||
|
private
|
||
|
|
||
|
def process_response?(response)
|
||
|
super && response.effective_url.query == 'raw=1¯os=1'
|
||
|
end
|
||
|
end
|
||
|
end
|