]> git.proxmox.com Git - rustc.git/commitdiff
Remove more remote JS stuff
authorXimin Luo <infinity0@debian.org>
Sat, 25 Nov 2017 17:29:27 +0000 (18:29 +0100)
committerXimin Luo <infinity0@debian.org>
Sat, 25 Nov 2017 17:29:27 +0000 (18:29 +0100)
debian/patches/d-no-web-dependencies-in-doc.patch

index b98ff581ff44d60a6f2bcf79a52a28355b17091c..3ad20fe400c24c469467fa8abf009f8c8c3026c4 100644 (file)
@@ -107,6 +107,102 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
          {{#if is_print}}
          <script>
              $(document).ready(function() {
+--- a/src/doc/reference/theme/index.hbs
++++ b/src/doc/reference/theme/index.hbs
+@@ -10,15 +10,13 @@
+         <base href="{{ path_to_root }}">
+         <link rel="stylesheet" href="book.css">
+-        <link href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800" rel="stylesheet" type="text/css">
+-        <link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:500" rel="stylesheet" type="text/css">
+         <link rel="shortcut icon" href="{{ favicon }}">
+         <!-- Font Awesome -->
+-        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
++        <link rel="stylesheet" href="../font-awesome.min.css">
+-        <link rel="stylesheet" href="highlight.css">
++        <link rel="stylesheet" href="../highlight.css">
+         <link rel="stylesheet" href="tomorrow-night.css">
+         <link rel="stylesheet" href="ayu-highlight.css">
+         <style>
+@@ -79,27 +77,10 @@
+         {{#if mathjax_support}}
+         <!-- MathJax -->
+-        <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
++        <script type="text/javascript" src="../mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
+         {{/if}}
+-        <!-- Fetch Clipboard.js from CDN but have a local fallback -->
+-        <script src="https://cdn.jsdelivr.net/clipboard.js/1.6.1/clipboard.min.js"></script>
+-        <script>
+-            if (typeof Clipboard == 'undefined') {
+-                document.write(unescape("%3Cscript src='clipboard.min.js'%3E%3C/script%3E"));
+-            }
+-        </script>
+-
+-        <!-- Fetch JQuery from CDN but have a local fallback -->
+-        <script src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
+-        <script>
+-            if (typeof jQuery == 'undefined') {
+-                document.write(unescape("%3Cscript src='jquery.js'%3E%3C/script%3E"));
+-            }
+-        </script>
+-
+-        <!-- Fetch store.js from local - TODO add CDN when 2.x.x is available on cdnjs -->
+-        <script src="store.js"></script>
++        <script src="../jquery.min.js"></script>
+         <!-- Custom JS script -->
+         {{#each additional_js}}
+@@ -183,36 +164,9 @@
+         </div>
+-        <!-- Local fallback for Font Awesome -->
+-        <script>
+-            if ($(".fa").css("font-family") !== "FontAwesome") {
+-                $('<link rel="stylesheet" type="text/css" href="_FontAwesome/css/font-awesome.css">').prependTo('head');
+-            }
+-        </script>
+-
+         <!-- Livereload script (if served using the cli tool) -->
+         {{{livereload}}}
+-        {{#if google_analytics}}
+-        <script>
+-        (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+-        (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+-        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+-        })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
+-
+-        ga('create', '{{google_analytics}}', 'auto');
+-        ga('send', 'pageview');
+-        </script>
+-        {{/if}}
+-
+-        {{#if playpens_editable}}
+-        <script src="{{ ace_js }}" type="text/javascript" charset="utf-8"></script>
+-        <script src="{{ editor_js }}" type="text/javascript" charset="utf-8"></script>
+-        <script src="{{ mode_rust_js }}" type="text/javascript" charset="utf-8"></script>
+-        <script src="{{ theme_dawn_js }}" type="text/javascript" charset="utf-8"></script>
+-        <script src="{{ theme_tomorrow_night_js }}" type="text/javascript" charset="utf-8"></script>
+-        {{/if}}
+-
+         {{#if is_print}}
+         <script>
+             $(document).ready(function() {
+@@ -221,7 +175,7 @@
+         </script>
+         {{/if}}
+-        <script src="highlight.js"></script>
++        <script src="../highlight.js"></script>
+         <script src="book.js"></script>
+     </body>
+ </html>
 --- a/src/vendor/mdbook/src/book/mod.rs
 +++ b/src/vendor/mdbook/src/book/mod.rs
 @@ -274,14 +274,6 @@
@@ -215,7 +311,29 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
          $('body').removeClass().addClass(theme);
      }
  
-@@ -336,17 +334,13 @@
+@@ -231,21 +229,6 @@
+         });
+     });
+-    var clipboardSnippets = new Clipboard('.clip-button', {
+-        text: function(trigger) {
+-            hideTooltip(trigger);
+-            let playpen = $(trigger).parents(".playpen");
+-            return playpen_text(playpen);
+-        }
+-    });
+-    clipboardSnippets.on('success', function(e) {
+-            e.clearSelection();
+-            showTooltip(e.trigger, "Copied!");
+-    });
+-    clipboardSnippets.on('error', function(e) {
+-            showTooltip(e.trigger, "Clipboard error!");
+-    });
+-
+     $.ajax({
+         url: "https://play.rust-lang.org/meta/crates",
+         method: "POST",
+@@ -336,17 +319,13 @@
      var html = $("html");
      if ( html.hasClass("sidebar-hidden") ) {
          html.removeClass("sidebar-hidden").addClass("sidebar-visible");
@@ -253,7 +371,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
          <link rel="stylesheet" href="tomorrow-night.css">
          <link rel="stylesheet" href="ayu-highlight.css">
  
-@@ -29,7 +27,7 @@
+@@ -29,27 +27,10 @@
  
          {{#if mathjax_support}}
          <!-- MathJax -->
@@ -261,11 +379,14 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
 +        <script type="text/javascript" src="../mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
          {{/if}}
  
-         <!-- Fetch Clipboard.js from CDN but have a local fallback -->
-@@ -40,16 +38,7 @@
-             }
-         </script>
+-        <!-- Fetch Clipboard.js from CDN but have a local fallback -->
+-        <script src="https://cdn.jsdelivr.net/clipboard.js/1.6.1/clipboard.min.js"></script>
+-        <script>
+-            if (typeof Clipboard == 'undefined') {
+-                document.write(unescape("%3Cscript src='clipboard.min.js'%3E%3C/script%3E"));
+-            }
+-        </script>
+-
 -        <!-- Fetch JQuery from CDN but have a local fallback -->
 -        <script src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
 -        <script>
@@ -280,7 +401,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
  
          <!-- Custom JS script -->
          {{#each additional_js}}
-@@ -58,20 +47,6 @@
+@@ -58,20 +39,6 @@
  
      </head>
      <body class="light">
@@ -301,7 +422,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
          <div id="sidebar" class="sidebar">
              {{#toc}}{{/toc}}
          </div>
-@@ -128,36 +103,9 @@
+@@ -128,36 +95,9 @@
          </div>
  
  
@@ -338,7 +459,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
          {{#if is_print}}
          <script>
              $(document).ready(function() {
-@@ -166,7 +114,7 @@
+@@ -166,7 +106,7 @@
          </script>
          {{/if}}