Sha256: 66b8773cbcbdfac2bdd354eaa232068532aa538a7abb1c2428f30e05f6ffa218

Contents?: true

Size: 309 Bytes

Versions: 11

Compression:

Stored size: 309 Bytes

Contents

# -*- encoding : utf-8 -*-

include_set Abstract::JavaScript

event :validate_javascript_syntax, :validate, on: :save, changed: %i[type_id content] do
  Uglifier.compile content, harmony: true
rescue Uglifier::Error => e
  errors.add :content, "<pre>#{Cardio::Utils.ansi2html(e.message)}</pre>".html_safe
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
card-mod-script-0.18.1 set/type/java_script.rb
card-mod-script-0.18.0 set/type/java_script.rb
card-mod-script-0.17.0 set/type/java_script.rb
card-mod-script-0.16.0 set/type/java_script.rb
card-mod-script-0.15.6 set/type/java_script.rb
card-mod-script-0.15.5 set/type/java_script.rb
card-mod-script-0.15.4 set/type/java_script.rb
card-mod-script-0.15.3 set/type/java_script.rb
card-mod-script-0.15.2.pre1 set/type/java_script.rb
card-mod-script-0.15.1.1 set/type/java_script.rb
card-mod-script-0.15.1 set/type/java_script.rb