Welcome to mirror list, hosted at ThFree Co, Russian Federation.

diff.html.in « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 2e8cf01578e62a06d1015a8835a854484029f1de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
    <title>@title@</title>
    <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.11.0/styles/github.min.css">
    <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/diff2html/2.3.0/diff2html.min.css">
    <link rel='stylesheet' href='https://fonts.googleapis.com/css?family=Open+Sans' />
  </head>
  <body style="font-family: 'Open Sans'">
    <h1>@title@</h1>
    <p>@description@</p>
    <p>Download <a id="patchdownload" href="#">changes.patch</a> which can be applied with <code>git apply changes.patch</code>.</p>

    <script type="text/javascript" id="diffsource">/*<![CDATA[
@diffdata@
]]>*/
    </script>
    <div id="diff">Loading ...</div>

    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.3/jquery.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.11.0/highlight.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.11.0/languages/cs.min.js"></script>

    <script src="https://cdnjs.cloudflare.com/ajax/libs/diff2html/2.3.0/diff2html.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/diff2html/2.3.0/diff2html-ui.min.js"></script>

    <script src="https://cdnjs.cloudflare.com/ajax/libs/FileSaver.js/1.3.3/FileSaver.min.js"></script>

    <script>
    $(document).ready(function() {
        var diffText = $("#diffsource")[0].childNodes[0].nodeValue;
        $("#diffsource").remove();
        diffText = diffText.substring(12, diffText.length - 10);
        if (diffText.length == 0) {
          $("#diff").text("No changes found.");
          return;
        }

        $("#patchdownload").click(function() {
          var blob = new Blob([diffText], { type: "text/plain;charset=utf-8;" });
          saveAs(blob, "changes.patch", true);
        });

        var diff2htmlUi = new Diff2HtmlUI({diff: diffText});
        diff2htmlUi.draw('#diff', {showFiles: true, matching: 'none'});
        setTimeout(function() {
          diff2htmlUi.highlightCode('#diff');
        }, 100);
    });
    </script>
  </body>
</html>