Permalink
Browse files

Merge branch 'gh-pages' into text-ui-refactorings

  • Loading branch information...
2 parents 7e4f8d9 + a2c6caf commit c31e3b5adc0c423a0f82cf1b1d425b7e81964aba @toolness committed Jun 18, 2012
Showing with 21 additions and 21 deletions.
  1. +5 −1 index.html
  2. +0 −11 js/main.js
  3. +1 −1 slowparse
  4. +14 −7 test/index.html
  5. +1 −1 test/test-app.js
View
@@ -177,7 +177,11 @@
<script src="js/underscore.min.js"></script>
<script src="js/backbone.min.js"></script>
<script src="slowparse/spec/errors.jquery.js"></script>
- <script src="//use.typekit.com/qjh6hdg.js"></script>
+ <script>
+ if (!location.search.match(/notypekit=1/))
+ document.write('<script src="//use.typekit.com/qjh6hdg.js"></' +
+ 'script>');
+ </script>
<script data-main="js/main" src="js/require.min.js"></script>
<!-- this COULD hold up the page, so do this absolutely last -->
View
@@ -146,17 +146,6 @@ define("main", function(require) {
}
});
- // prevent CodeMirror from hijacking clicks on the help and error notices
- $("div.help, div.error").each(function(){
- this.onmousedown = function(event) {
- if (event.cancelBubble) {
- event.cancelBubble = true;
- } else if (event.stopPropagation) {
- event.stopPropagation();
- }
- return false;
- };
- });
window.addEventListener("hashchange", function(event) {
// We don't currently support dynamically changing the URL
View
@@ -7,13 +7,15 @@
<script>
// IE9 really wants base hrefs to be absolute URLs, so we'll do that...
(function() {
- var base = document.querySelector("base[href]");
- var a = document.createElement("a");
- a.setAttribute("href", "");
- if (a.href == location.href) {
- // The host browser clearly isn't paying attention to our base tag.
- a.setAttribute("href", "..");
- base.setAttribute("href", a.href);
+ try {
+ var base = document.querySelector("base[href]");
+ var pathRE = /(.*)\/test\/(index\.html)?$/;
+ var match = location.pathname.match(pathRE);
+ var pathname = match[1] ? match[1] : "";
+ var href = location.protocol + "//" + location.host + pathname + "/";
+ base.setAttribute("href", href);
+ } catch (e) {
+ alert("ERROR setting base href: " + e);
}
})();
</script>
@@ -60,5 +62,10 @@ <h2 id="qunit-userAgent"></h2>
QUnit.start();
});
</script>
+
+ <script>
+ if (location.search.match(/externalreporter=1/))
+ document.write('<script src="/externalreporter.js"></' + 'script>');
+ </script>
</body>
</html>
View
@@ -2,7 +2,7 @@ require(["lscache"], function(lscache) {
module("app");
function appTest(name, cb) {
- var iframe = $('<iframe src="index.html"></iframe>');
+ var iframe = $('<iframe src="index.html?notypekit=1"></iframe>');
iframe.css({
visibility: "hidden",
width: "800px",

0 comments on commit c31e3b5

Please sign in to comment.