-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #396 from GSA/trigve-hagen/questions-finished
Trigve hagen/questions finished
- Loading branch information
Showing
42 changed files
with
4,601 additions
and
25 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/*! https://mths.be/startswith v0.2.0 by @mathias */ | ||
if (!String.prototype.startsWith) { | ||
(function() { | ||
'use strict'; // needed to support `apply`/`call` with `undefined`/`null` | ||
var defineProperty = (function() { | ||
// IE 8 only supports `Object.defineProperty` on DOM elements | ||
try { | ||
var object = {}; | ||
var $defineProperty = Object.defineProperty; | ||
var result = $defineProperty(object, object, object) && $defineProperty; | ||
} catch(error) {} | ||
return result; | ||
}()); | ||
var toString = {}.toString; | ||
var startsWith = function(search) { | ||
if (this == null) { | ||
throw TypeError(); | ||
} | ||
var string = String(this); | ||
if (search && toString.call(search) == '[object RegExp]') { | ||
throw TypeError(); | ||
} | ||
var stringLength = string.length; | ||
var searchString = String(search); | ||
var searchLength = searchString.length; | ||
var position = arguments.length > 1 ? arguments[1] : undefined; | ||
// `ToInteger` | ||
var pos = position ? Number(position) : 0; | ||
if (pos != pos) { // better `isNaN` | ||
pos = 0; | ||
} | ||
var start = Math.min(Math.max(pos, 0), stringLength); | ||
// Avoid the `indexOf` call if no match is possible | ||
if (searchLength + start > stringLength) { | ||
return false; | ||
} | ||
var index = -1; | ||
while (++index < searchLength) { | ||
if (string.charCodeAt(start + index) != searchString.charCodeAt(index)) { | ||
return false; | ||
} | ||
} | ||
return true; | ||
}; | ||
if (defineProperty) { | ||
defineProperty(String.prototype, 'startsWith', { | ||
'value': startsWith, | ||
'configurable': true, | ||
'writable': true | ||
}); | ||
} else { | ||
String.prototype.startsWith = startsWith; | ||
} | ||
}()); | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
window.onload = function() { | ||
reloadTemplate(); | ||
}; | ||
|
||
function reloadTemplate(){ | ||
var language = document.getElementsByTagName("html")[0].getAttribute('lang'); | ||
var switchLanguage = language.startsWith('en') ? 'fr' : 'en'; | ||
|
||
/* var defTop = document.getElementById("def-top"); | ||
defTop.outerHTML = wet.builder.appTop({ | ||
appName: [ | ||
{ | ||
href: "#", | ||
text: (switchLanguage === 'en' ? "Évaluation de l'incidence algorithmique" : 'Algorithmic Impact Assessment') | ||
} | ||
], | ||
search: false, | ||
lngLinks: [ | ||
{ | ||
lang: switchLanguage, | ||
href: "?lang=" + switchLanguage, | ||
text: (switchLanguage === 'en' ? 'English' : 'Français') | ||
} | ||
], | ||
breadcrumbs: [{ | ||
title: (switchLanguage === 'en' ? "Accueil" : "Home"), | ||
href: (switchLanguage === 'en' ? "https://www.canada.ca/fr.html" : "https://www.canada.ca/en.html"), | ||
},{ | ||
title: (switchLanguage === 'en' ? "Gouvernement ouvert" : "Open Government"), | ||
href: (switchLanguage === 'en' ? "https://ouvert.canada.ca/fr" : "https://open.canada.ca/en"), | ||
}] | ||
}); | ||
var defPreFooter = document.getElementById("def-preFooter"); | ||
defPreFooter.outerHTML = wet.builder.preFooter({ | ||
dateModified: "2021-03-22", | ||
versionIdentifier: "0.9", | ||
showPostContent: false, | ||
showShare: false | ||
}); | ||
var defFooter = document.getElementById("def-footer"); | ||
defFooter.outerHTML = wet.builder.appFooter({ | ||
"footerSections": [{ | ||
"href": (switchLanguage === 'en' ? "/fr/formulaire/faites-nous-part-de-vos-commentaires" : "/en/forms/contact-us"), | ||
"text": (switchLanguage === 'en' ? "Contactez-nous du gouvernement ouvert" : "Open Government Contact") | ||
},{ | ||
"href": (switchLanguage === 'en' ? "https://www.canada.ca/fr/gouvernement/min.html" : "https://www.canada.ca/en/government/dept.html"), | ||
"text": (switchLanguage === 'en' ? "Ministères et organismes" : "Departments and agencies") | ||
},{ | ||
"href": (switchLanguage === 'en' ? "https://www.canada.ca/fr/gouvernement/fonctionpublique.html" : "https://www.canada.ca/en/government/publicservice.html"), | ||
"text": (switchLanguage === 'en' ? "Fonction publique et force militaire" : "Public service and military") | ||
},{ | ||
"href": (switchLanguage === 'en' ? "http://nouvelles.gc.ca/" : "http://news.gc.ca/"), | ||
"text": (switchLanguage === 'en' ? "Nouvelles" : "News") | ||
},{ | ||
"href": (switchLanguage === 'en' ? "https://www.canada.ca/fr/gouvernement/systeme/lois.html" : "https://www.canada.ca/en/government/system/laws.html"), | ||
"text": (switchLanguage === 'en' ? "Traités, lois et règlements" : "Treaties, laws and regulations") | ||
},{ | ||
"href": (switchLanguage === 'en' ? "https://www.canada.ca/fr/transparence/rapports.html" : "https://www.canada.ca/en/transparency/reporting.html"), | ||
"text": (switchLanguage === 'en' ? "Rapports à l'échelle du gouvernement" : "Government-wide reporting") | ||
},{ | ||
"href": (switchLanguage === 'en' ? "/fr/user" : "/en/user"), | ||
"text": (switchLanguage === 'en' ? "Ouverture de session Gouvernement ouvert" : "Open Government Log In") | ||
},{ | ||
"href":(switchLanguage === 'en' ? "https://www.canada.ca/fr/gouvernement/systeme.html" : "https://www.canada.ca/en/government/system.html"), | ||
"text": (switchLanguage === 'en' ? "Comment le gouvernement fonctionne" : "How government works") | ||
}], | ||
"showFeatures": false | ||
}); */ | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.