mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 07:53:49 +08:00
Convert all CoffeeScript to Javascript. See:
http://meta.discourse.org/t/is-it-better-for-discourse-to-use-javascript-or-coffeescript/3153
This commit is contained in:
@ -1,4 +1,3 @@
|
||||
require 'coffee_script'
|
||||
require 'v8'
|
||||
require 'nokogiri'
|
||||
|
||||
@ -91,8 +90,8 @@ module PrettyText
|
||||
@ctx.eval("var Discourse = {}; Discourse.SiteSettings = #{SiteSetting.client_settings_json};")
|
||||
@ctx.eval("var window = {}; window.devicePixelRatio = 2;") # hack to make code think stuff is retina
|
||||
|
||||
@ctx.eval(CoffeeScript.compile(File.read(app_root + "app/assets/javascripts/discourse/components/bbcode.js.coffee")))
|
||||
@ctx.eval(CoffeeScript.compile(File.read(app_root + "app/assets/javascripts/discourse/components/utilities.coffee")))
|
||||
@ctx.load(app_root + "app/assets/javascripts/discourse/components/bbcode.js")
|
||||
@ctx.load(app_root + "app/assets/javascripts/discourse/components/utilities.js")
|
||||
|
||||
# Load server side javascripts
|
||||
if DiscoursePluginRegistry.server_side_javascripts.present?
|
||||
|
Reference in New Issue
Block a user