Debian Codegraph @

tests/output/app/simple-user-context.html

raw symbols ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
1 <!DOCTYPE html>
2 <html lang="en">
3 <head>
4 <meta charset="utf-8" />
5 <title>simple.md - Grip</title>
6 <link rel="icon" href="/__/grip/static/favicon.ico" />
7 <link rel="stylesheet" href="/__/grip/static/octicons/octicons.css" />
8 <style>
9 /* Page tweaks */
10 .preview-page {
11 margin-top: 64px;
12 margin-bottom: 21px;
13 }
14 /* User-content tweaks */
15 .timeline-comment-wrapper > .timeline-comment:after,
16 .timeline-comment-wrapper > .timeline-comment:before {
17 content: none;
18 }
19 /* User-content overrides */
20 .discussion-timeline.wide {
21 width: 920px;
22 }
23 </style>
24 </head>
25 <body>
26 <div class="page">
27 <div id="preview-page" class="preview-page" data-autorefresh-url="/__/grip/refresh/">
28 <main id="js-repo-pjax-container">
29 <div class="clearfix new-discussion-timeline container-xl px-3 px-md-4 px-lg-5">
30 <div class="repository-content">
31 <div class="clearfix">
32 <div class="Layout Layout--flowRow-until-md Layout--sidebarPosition-end Layout--sidebarPosition-flowRow-end">
33 <div class="Layout-main">
34
35
36
37 <div class="pull-discussion-timeline">
38 <div class="ml-0 pl-0 ml-md-6 pl-md-3">
39 <div class="TimelineItem pt-0">
40 <div class="timeline-comment-group TimelineItem-body my-0">
41 <div class="ml-n3 timeline-comment unminimized-comment comment previewable-edit editable-comment timeline-comment--caret reorderable-task-lists">
42
43 <div class="edit-comment-hide">
44 <table class="d-block">
45 <tbody class="d-block">
46 <tr class="d-block">
47 <td class="d-block comment-body markdown-body" id="grip-content">
48 <h1 dir="auto">Simple Test ✓</h1>
49 <p dir="auto">This is just a simple Unicode Markdown test.</p>
50 </td>
51 </tr>
52 </tbody>
53 </table>
54 </div>
55 </div>
56 </div>
57 </div>
58 </div>
59 </div>
60
61
62
63 </div>
64 </div>
65 </div>
66 </div>
67 </div>
68 </main>
69 </div>
70 </div><script>
71 function showCanonicalImages() {
72 var images = document.getElementsByTagName('img');
73 if (!images) {
74 return;
75 }
76 for (var index = 0; index < images.length; index++) {
77 var image = images[index];
78 if (image.getAttribute('data-canonical-src') && image.src !== image.getAttribute('data-canonical-src')) {
79 image.src = image.getAttribute('data-canonical-src');
80 }
81 }
82 }
83
84 function scrollToHash() {
85 if (location.hash && !document.querySelector(':target')) {
86 var element = document.getElementById('user-content-' + location.hash.slice(1));
87 if (element) {
88 element.scrollIntoView();
89 }
90 }
91 }
92
93 function autorefreshContent(eventSourceUrl) {
94 var initialTitle = document.title;
95 var contentElement = document.getElementById('grip-content');
96 var source = new EventSource(eventSourceUrl);
97 var isRendering = false;
98
99 source.onmessage = function(ev) {
100 var msg = JSON.parse(ev.data);
101 if (msg.updating) {
102 isRendering = true;
103 document.title = '(Rendering) ' + document.title;
104 } else {
105 isRendering = false;
106 document.title = initialTitle;
107 contentElement.innerHTML = msg.content;
108 showCanonicalImages();
109 }
110 }
111
112 source.onerror = function(e) {
113 if (e.readyState === EventSource.CLOSED && isRendering) {
114 isRendering = false;
115 document.title = initialTitle;
116 }
117 }
118 }
119
120 window.onhashchange = function() {
121 scrollToHash();
122 }
123
124 window.onload = function() {
125 scrollToHash();
126 }
127
128 showCanonicalImages();
129
130 var autorefreshUrl = document.getElementById('preview-page').getAttribute('data-autorefresh-url');
131 if (autorefreshUrl) {
132 autorefreshContent(autorefreshUrl);
133 }
134 </script>
135 </body>
136 </html>