From d03b9661e06c06fc648f060820b7e9c06c6ca009 Mon Sep 17 00:00:00 2001 From: remy Date: Fri, 24 Jun 2011 19:07:05 +0100 Subject: [PATCH] Changes to make local install of jsbin much easier - in particular for subdirectory hosting. --- .gitmodules | 3 - app.php | 16 +- css/style.css | 30 +- index.php | 27 +- js/vendor/jshint/jshint.js | 5853 ++++++++++++++++++++++++++++++++++++ sprocketize.php | 9 +- 6 files changed, 5899 insertions(+), 39 deletions(-) create mode 100755 js/vendor/jshint/jshint.js diff --git a/.gitmodules b/.gitmodules index 092cc5a5cb..e69de29bb2 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +0,0 @@ -[submodule "js/vendor/jshint"] - path = js/vendor/jshint - url = https://github.com/jshint/jshint.git diff --git a/app.php b/app.php index 250ab257f5..85d8c6dae4 100644 --- a/app.php +++ b/app.php @@ -1,8 +1,10 @@ ", $html); + $html = preg_replace('/", $html); } return array($html, $javascript); diff --git a/css/style.css b/css/style.css index 2a19064d09..fbba14b29a 100644 --- a/css/style.css +++ b/css/style.css @@ -1,11 +1,11 @@ /* Font via http://robey.lag.net/2010/06/21/mensch-font.html */ @font-face { font-family: 'MenschRegular'; - src: url('/font/mensch-webfont.eot'); - src: url('/font/mensch-webfont.eot?#iefix') format('eot'), - url('/font/mensch-webfont.woff') format('woff'), - url('/font/mensch-webfont.ttf') format('truetype'), - url('/font/mensch-webfont.svg#webfont0UwCC656') format('svg'); + src: url('../font/mensch-webfont.eot'); + src: url('../font/mensch-webfont.eot?#iefix') format('eot'), + url('../font/mensch-webfont.woff') format('woff'), + url('../font/mensch-webfont.ttf') format('truetype'), + url('../font/mensch-webfont.svg#webfont0UwCC656') format('svg'); font-weight: normal; font-style: normal; } @@ -17,7 +17,7 @@ body { font-size: 13px; min-width: 976px; overflow: hidden; - background: url(/images/jsbin-bg.gif) repeat-x 0 -10px; + background: url(../images/jsbin-bg.gif) repeat-x 0 -10px; } p { @@ -364,7 +364,7 @@ div.tall:hover { text-align: center; height: 18px; line-height: 14px; - background: url(/images/down.png) no-repeat 90% center; + background: url(../images/down.png) no-repeat 90% center; padding-right: 26px; font-weight: normal; text-decoration: none; @@ -373,7 +373,7 @@ div.tall:hover { } #control div.group:hover .title { - background: #eee url(/images/down-hover.png) no-repeat 90% center; + background: #eee url(../images/down-hover.png) no-repeat 90% center; } #control div.group .button { @@ -525,12 +525,12 @@ body.preview #source select { .video { padding-left: 20px; - background: url(/images/play.gif) no-repeat left center; + background: url(../images/play.gif) no-repeat left center; } #info { display: inline-block; - background: url(/images/info.gif) no-repeat bottom left; + background: url(../images/info.gif) no-repeat bottom left; color: #fff; font-weight: bold; font-style: italic; @@ -544,7 +544,7 @@ body.preview #source select { } #info:hover { - background: url(/images/info.gif) no-repeat top left; + background: url(../images/info.gif) no-repeat top left; } #startingpoint { @@ -642,7 +642,7 @@ div.javascript { width: 100%; height: 100%; z-index: 99; - background: url(/images/op7.png) repeat; + background: url(../images/op7.png) repeat; } .hud .outercontainer { @@ -884,13 +884,13 @@ ie6, li { .button.download { padding-left: 24px; /* background-image: url(/images/arrow_down_12x12.png);*/ - background-image: url(/images/download.png); + background-image: url(../images/download.png); background-repeat: no-repeat; background-position: 8px -33px; } .button.download:hover { - background-image: url(/images/download.png); + background-image: url(../images/download.png); background-repeat: no-repeat; background-position: 8px 7px; } @@ -917,7 +917,7 @@ ie6, li { } #live { - background: white url(/images/jsbin-bg.gif) repeat-x 0 -62px; + background: white url(../images/jsbin-bg.gif) repeat-x 0 -62px; top: 0; left: 67%; border-top: 0; diff --git a/index.php b/index.php index aa01bac0ac..03b0439761 100644 --- a/index.php +++ b/index.php @@ -20,17 +20,18 @@ if ($revision != 1 && $revision) { $code_id .= '/' . $revision; } -$code_id_path = ''; +$code_id_path = ROOT; if ($code_id) { - $code_id_path = '/' . $code_id; + $code_id_path = ROOT . $code_id . '/'; } + ?> JS Bin - Collaborative JavaScript Debugging - + @@ -41,20 +42,20 @@
Code Render - + - http:// + http://
- Save - Clone - Save + Save + Clone + Save View: @@ -101,7 +102,7 @@
-
+
@@ -175,7 +176,7 @@ ?> - +