mirror of
https://github.com/LCPQ/QUESTDB_website.git
synced 2024-11-04 05:03:53 +01:00
deploy: 2b6099dff9
This commit is contained in:
parent
1bea6f1ee3
commit
a11ed8cc4b
6198
data/database.json
6198
data/database.json
File diff suppressed because one or more lines are too long
@ -28,7 +28,8 @@ class PubliData{
|
||||
}
|
||||
|
||||
static GetPathForDOI(DOI){
|
||||
return `/data/publis/${DOI.replaceAll(".","/")}`
|
||||
var site_url = window.location.origin;
|
||||
return site_url + `/data/publis/${DOI.replaceAll(".","/")}`
|
||||
}
|
||||
static GetAbstractURLForDOI(DOI){
|
||||
return `${PubliData.GetPathForDOI(DOI)}/abstract.html`
|
||||
|
@ -232,8 +232,9 @@ class dataFileBase {
|
||||
return /^#\s*([A-Za-z_]+)\s*:\s*(.*)$/;
|
||||
}
|
||||
async getGeometryAsync(state = null) {
|
||||
var site_url = "/"+window.location.pathname.split('/')[1];
|
||||
// var text = await getTextFromFileUrlAsync(`/data/structures/${this.set.name.replace("#", "")}/${this.molecule.toLowerCase()}.xyz`)
|
||||
var text = getTextFromFileUrl(`/data/structures/${this.set.name.replace("#", "")}/${this.molecule.toLowerCase()}.xyz`)
|
||||
var text = getTextFromFileUrl(site_url+`/data/structures/${this.set.name.replace("#", "")}/${this.molecule.toLowerCase()}.xyz`)
|
||||
var lines = text.split("\n")
|
||||
var indexes = lines.findAllIndexes((line) => {
|
||||
return line.match(/^\d+$/)
|
||||
|
@ -1,3 +1,4 @@
|
||||
function getFullDataPath(path) {
|
||||
return '/data/' + path;
|
||||
var site_url = "/"+window.location.pathname.split('/')[1];
|
||||
return site_url+'/data/' + path;
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
var fileCache = function () {
|
||||
var json_url = "/data/database.json";
|
||||
var site_url = "/"+window.location.pathname.split('/')[1];
|
||||
var json_url = site_url+"/data/database.json";
|
||||
var req = new XMLHttpRequest();
|
||||
req.open("GET",json_url, false);
|
||||
req.send();
|
||||
|
@ -5,7 +5,8 @@ class indexDB {
|
||||
}
|
||||
var db = new indexDB
|
||||
const maxAge= (DebugMode.Enabled,0,600)
|
||||
const text = await getTextFromFileUrlAsync("/data/index.yaml",{"Cache-Control":`max-age=${maxAge}`})
|
||||
var site_url = "/"+window.location.pathname.split('/')[1];
|
||||
const text = await getTextFromFileUrlAsync(site_url+"/data/index.yaml",{"Cache-Control":`max-age=${maxAge}`})
|
||||
const myYaml = jsyaml.load(text);
|
||||
db.sets = ((myYaml.sets === null) ? new Map() : new Map(Object.entries(myYaml.sets)));
|
||||
db.others = ((myYaml.others === null) ? [] : Array.from(myYaml.others));
|
||||
|
Loading…
Reference in New Issue
Block a user