Unified · Split
| @@ -1,19 +0,0 @@ | |||
| 1 | module Docs | ||
| 2 | class Mdn | ||
| 3 | class ContributeLinkFilter < Filter | ||
| 4 | def call | ||
| 5 | return html if current_url.host != 'developer.mozilla.org' | ||
| 6 | |||
| 7 | html << <<-HTML.strip_heredoc | ||
| 8 | <div class="_attribution"> | ||
| 9 | <p class="_attribution-p"> | ||
| 10 | <a href="#{current_url}$edit" class="_attribution-link">Edit this page on MDN</a> | ||
| 11 | </p> | ||
| 12 | </div> | ||
| 13 | HTML | ||
| 14 | |||
| 15 | html | ||
| 16 | end | ||
| 17 | end | ||
| 18 | end | ||
| 19 | end | ||
| @@ -7,7 +7,6 @@ module Docs · 6 unmodified lines | |||
| 7 | params[:macros] = 1 | 7 | params[:macros] = 1 |
| 8 | 8 | ||
| 9 | html_filters.push 'mdn/clean_html' | 9 | html_filters.push 'mdn/clean_html' |
| 10 | text_filters.insert_before 'attribution', 'mdn/contribute_link' | ||
| 11 | 10 | ||
| 12 | options[:rate_limit] = 200 | 11 | options[:rate_limit] = 200 |
| 13 | options[:trailing_slash] = false | 12 | options[:trailing_slash] = false |