mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-23 02:27:39 +03:00
Fixes run button appearing when it shouldn't
This commit is contained in:
@@ -176,10 +176,10 @@ pub fn render<T: fmt::Display, S: fmt::Display>(
|
||||
krate = layout.krate,
|
||||
play_url = layout.playground_url,
|
||||
play_js = if layout.playground_url.is_empty() {
|
||||
"".to_string()
|
||||
format!(r#"<script src="{}extra.js"></script>"#, page.root_path)
|
||||
} else {
|
||||
format!(r#"<script src="{}playpen.js"></script>"#, page.root_path)
|
||||
},
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
// Copyright 2014-2016 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
/*jslint browser: true, es5: true */
|
||||
/*globals $: true, rootPath: true */
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
'use strict';
|
||||
|
||||
if (!window.playgroundUrl) {
|
||||
var runButtons = document.querySelectorAll(".test-arrow");
|
||||
|
||||
for (var i = 0; i < runButtons.length; i++) {
|
||||
runButtons[i].classList.remove("test-arrow");
|
||||
}
|
||||
return;
|
||||
}
|
||||
});
|
||||
@@ -15,6 +15,11 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
'use strict';
|
||||
|
||||
if (!window.playgroundUrl) {
|
||||
var runButtons = document.querySelectorAll(".test-arrow");
|
||||
|
||||
for (var i = 0; i < runButtons.length; i++) {
|
||||
runButtons[i].classList.remove("test-arrow");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user