Outline for survey implementation (#27305)
This commit is contained in:
parent
d492d7165a
commit
2acf6fdb6b
25
dev/docs/assets/api_survey.js
Normal file
25
dev/docs/assets/api_survey.js
Normal file
@ -0,0 +1,25 @@
|
||||
window.ApiSurveyDocs = function(apiPages) {
|
||||
var url = window.location.href;
|
||||
var fragments = url.split('/');
|
||||
if (fragments == null || fragments.length == 0) {
|
||||
return;
|
||||
}
|
||||
var classFragment = fragments[fragments.length -1];
|
||||
if (classFragment == null) {
|
||||
return;
|
||||
}
|
||||
var apiDocClassFragments = classFragment.split('-');
|
||||
if (apiDocClassFragments.length != 2) {
|
||||
return;
|
||||
}
|
||||
var apiDocClass = apiDocClassFragments[0];
|
||||
if (url == null || apiPages.indexOf(apiDocClass) == -1) {
|
||||
return;
|
||||
}
|
||||
scriptElement = document.createElement('script');
|
||||
scriptElement.setAttribute('src', 'https://www.google.com/insights/consumersurveys/async_survey?site=sygvgfetfwmwm7isniaym3m6f4');
|
||||
document.head.appendChild(scriptElement);
|
||||
}
|
||||
scriptElement = document.createElement('script');
|
||||
scriptElement.setAttribute('src', 'https://storage.googleapis.com/flutter-dashboard.appspot.com/api_survey/api_survey_docs.html');
|
||||
document.head.appendChild(scriptElement);
|
@ -1,3 +1,4 @@
|
||||
<script async="" defer=""
|
||||
src="//www.google.com/insights/consumersurveys/async_survey?site=i2bdmo2dzky7fqws25nicgx5f4">
|
||||
</script>
|
||||
<script async="" defer="" src="../assets/api_survey.js"></script>
|
||||
|
Loading…
x
Reference in New Issue
Block a user