Skip to content

Commit

Permalink
move function into preProcess
Browse files Browse the repository at this point in the history
  • Loading branch information
deniak committed Jan 20, 2021
1 parent b3d5590 commit 2de1d95
Showing 1 changed file with 19 additions and 17 deletions.
36 changes: 19 additions & 17 deletions gap-analysis/index.html
Expand Up @@ -17,7 +17,7 @@
//publishDate: "2020-06-16",
//previousPublishDate: "2014-12-16",
//previousMaturity: "FPWD",

// langs array lists languages addressed by this document, in order of speaker (highest first)
// it is used to generate the javascript needed for the matrix
langs: ['Arabic', 'Persian'],
Expand All @@ -39,22 +39,24 @@
],


github: "w3c/alreq",
group: "i18n",

postProcess: [
function importStyleSheet() {
[...document.querySelectorAll("link[rel='stylesheet'][data-import]")].forEach(l => {
const style = document.createElement("style");
fetch(l.href).then(r => r.text()).then(t => {
style.textContent = t;
l.replaceWith(style);
});
});
},
() => { addPrompts() },
() => { getAllData('alreq', 'doc:arfa') }
],
github: "w3c/alreq",
group: "i18n",
preProcess: [
() => { addPrompts() },
() => { getAllData('alreq', 'doc:arfa') }
],

postProcess: [
function importStyleSheet() {
[...document.querySelectorAll("link[rel='stylesheet'][data-import]")].forEach(l => {
const style = document.createElement("style");
fetch(l.href).then(r => r.text()).then(t => {
style.textContent = t;
l.replaceWith(style);
});
});
}
],
};
</script>

Expand Down

0 comments on commit 2de1d95

Please sign in to comment.