From 9f250d74edfc720833fb8690beed3c0bd8eeb649 Mon Sep 17 00:00:00 2001 From: Chris Wanstrath Date: Tue, 23 Aug 2011 00:37:31 -0700 Subject: [PATCH] ~/.atomicity/{*.js,*.coffee,twilight.coffee} --- HTML/atomicity.coffee | 14 ++++++++++++++ HTML/index.html | 6 ------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/HTML/atomicity.coffee b/HTML/atomicity.coffee index dceeaa072..df53e9e28 100644 --- a/HTML/atomicity.coffee +++ b/HTML/atomicity.coffee @@ -9,6 +9,20 @@ editor.getSession().setMode new JavaScriptMode editor.getSession().setUseSoftTabs true editor.getSession().setTabSize 2 +if css = File.read "~/.atomicity/twilight.css" + head = $('head')[0] + style = document.createElement 'style' + rules = document.createTextNode css + style.type = 'text/css' + style.appendChild rules + head.appendChild style + +_.map Dir.list("~/.atomicity/"), (path) -> + if /\.js$/.test path + $.getScript path + else if /\.coffee/.test path + eval CoffeeScript.compile File.read path + filename = null editor.getSession().on 'change', -> Chrome.setDirty true diff --git a/HTML/index.html b/HTML/index.html index e755916b7..1ca7f99a2 100644 --- a/HTML/index.html +++ b/HTML/index.html @@ -26,11 +26,5 @@ \ No newline at end of file