Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move function into preProcess #240

Merged
merged 1 commit into from
Jan 20, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 19 additions & 17 deletions gap-analysis/index.html
Original file line number Diff line number Diff line change
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