File: github_issue_links.js

package info (click to toggle)
cloud-init 25.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 12,412 kB
  • sloc: python: 135,894; sh: 3,883; makefile: 141; javascript: 30; xml: 22
file content (23 lines) | stat: -rw-r--r-- 764 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
window.onload = function () {
  const link = document.createElement("a");
  link.classList.add("muted-link");
  link.classList.add("github-issue-link");
  link.text = "Give feedback";
  link.href = (
    "https://github.com/canonical/cloud-init/issues/new?"
    + "assignees=&labels=documentation%2C+new&projects=&template=documentation.md&title=%5Bdocs%5D%3A+"
    + "&body=%23 Documentation request"
    + "%0A%0A%0A%0A%0A"
    + "---"
    + "%0A"
    + `*Reported+from%3A+${location.href}*`
  );
  link.target = "_blank";

  const div = document.createElement("div");
  div.classList.add("github-issue-link-container");
  div.append(link)

  const container = document.querySelector(".article-container > .content-icon-container");
  container.prepend(div);
};