<%- title t('scripts.code_title', script_name: @script.name(request_locale)) %>
<%- description "Source code for #{@script.name(request_locale)}" %>

<%= render partial: 'install', locals: {script: @script, script_version: @script_version} %>

<%= render partial: 'feedback_suggestion', locals: {script: @script} %>

<%= render partial: 'shared/in_page_ad', locals: { ad_method: @ad_method, div_id: 'script-show-code-ad', adsense_slot: '2579817802', ea_div_id: 'script-show-code-ea', fallback_ea: true} %>

<script src="https://cdn.jsdelivr.net/gh/google/code-prettify@master/loader/run_prettify.js?lang=css"></script>

<div>
  <input type="checkbox" id="wrap-lines" checked value="1"><label for="wrap-lines" class="checkbox-label"><%= t('scripts.wrap_lines') %></label>
</div>
<div class="code-container">
  <%= tag.pre(class: if @code.length <= Rails.configuration.syntax_highlighting_limit
  ['prettyprint', 'linenums', 'wrap', @script.css? ? 'lang-css' : 'lang-js']
else
  ['uglyprint']
end ) { @code } %>
</div>
