about summary refs log tree commit diff
path: root/src/librustdoc/html/static/extra.js
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2016-09-21 23:43:03 +0200
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2016-10-05 21:14:55 +0200
commit8983d1e67acdffb697497c8ddb49c355c8c1fdfc (patch)
tree213567efd3a22b1c4fd658452455e71a1203b52b /src/librustdoc/html/static/extra.js
parent5cc6c6b1b76960441c39ef29e951f22de45da15b (diff)
Fixes run button appearing when it shouldn't
Diffstat (limited to 'src/librustdoc/html/static/extra.js')
-rw-r--r--src/librustdoc/html/static/extra.js25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/librustdoc/html/static/extra.js b/src/librustdoc/html/static/extra.js
new file mode 100644
index 00000000000..d9d97d9b883
--- /dev/null
+++ b/src/librustdoc/html/static/extra.js
@@ -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;
+    }
+});