forked from ieee-vgtc/ieeevis.org
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherror.js
More file actions
17 lines (16 loc) · 707 Bytes
/
error.js
File metadata and controls
17 lines (16 loc) · 707 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
function send_to_create_gh_flow()
{
var base = "https://github.com/ieee-vgtc/ieeevis.org/new/master";
var p = base + window.location.pathname;
var i = p.lastIndexOf("/");
var filename = p.substr(i+1) + ".md";
var pWithoutFileName = p.substring(0, i);
var yaml_front_matter;
yaml_front_matter = ["---",
"title: " + p.substr(i+1),
"layout: main-2019",
"permalink: " + window.location.pathname,
"---\n\n"];
yaml_front_matter = yaml_front_matter.join("\n");
window.location = pWithoutFileName + "?filename=" + filename + "&value=" + encodeURIComponent(yaml_front_matter);
}