Moved feedback script to _scripts-include.jade
This commit is contained in:
parent
5be5985358
commit
377f924ae2
|
@ -43,3 +43,19 @@ if current.path[0] == "docs"
|
||||||
})(window,document,'script','//s.swiftypecdn.com/install/v1/st.js','_st');
|
})(window,document,'script','//s.swiftypecdn.com/install/v1/st.js','_st');
|
||||||
|
|
||||||
_st('install','VsuU7kH5Hnnj9tfyNvfK');
|
_st('install','VsuU7kH5Hnnj9tfyNvfK');
|
||||||
|
|
||||||
|
<!-- Google Feedback -->
|
||||||
|
script(src="//www.gstatic.com/feedback/api.js" type="text/javascript")
|
||||||
|
|
||||||
|
script.
|
||||||
|
var btn = document.getElementById("feedback-btn");
|
||||||
|
var submitFeedback = function() {
|
||||||
|
var dropdown = document.getElementById("feedback-dropdown");
|
||||||
|
var configuration = {
|
||||||
|
'productId': 'Angular',
|
||||||
|
'authuser': '1',
|
||||||
|
'bucket': dropdown.options[dropdown.selectedIndex].value
|
||||||
|
}
|
||||||
|
userfeedback.api.startFeedback(configuration);
|
||||||
|
}
|
||||||
|
btn.addEventListener("click", submitFeedback);
|
||||||
|
|
|
@ -1,24 +1,8 @@
|
||||||
div(flex)
|
div(flex)
|
||||||
p.
|
p.
|
||||||
What's your question about?
|
What's your question about?
|
||||||
select#dropdown(name="Angular Version" class="dropdown")
|
select#feedback-dropdown(name="Angular Version")
|
||||||
option(value="Angular2") Angular2
|
option(value="Angular2") Angular2
|
||||||
option(value="AngularJS") AngularJS
|
option(value="AngularJS") AngularJS
|
||||||
button#btn(class="btn").
|
button#feedback-btn.
|
||||||
Submit
|
Submit
|
||||||
|
|
||||||
script(src="//www.gstatic.com/feedback/api.js" type="text/javascript")
|
|
||||||
|
|
||||||
script.
|
|
||||||
var btn = document.getElementById("btn");
|
|
||||||
var submitFeedback = function() {
|
|
||||||
var dropdown = document.getElementById("dropdown");
|
|
||||||
var configuration = {
|
|
||||||
'productId': 'Angular',
|
|
||||||
'authuser': '1',
|
|
||||||
'bucket': dropdown.options[dropdown.selectedIndex].value
|
|
||||||
}
|
|
||||||
userfeedback.api.startFeedback(configuration);
|
|
||||||
}
|
|
||||||
btn.addEventListener("click", submitFeedback);
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue