Moved feedback script to _scripts-include.jade

This commit is contained in:
Teresa 2015-12-07 22:44:35 -08:00 committed by Naomi Black
parent 014404239d
commit 0ddf63957c
2 changed files with 3 additions and 20 deletions

View File

@ -50,4 +50,3 @@ if current.path[0] == "docs"
<!-- Google Feedback -->
script(src="//www.gstatic.com/feedback/api.js" type="text/javascript")

View File

@ -1,24 +1,8 @@
div(flex)
p.
What's your question about?
select#dropdown(name="Angular Version" class="dropdown")
select#feedback-dropdown(name="Angular Version")
option(value="Angular2") Angular2
option(value="AngularJS") AngularJS
button#btn(class="btn").
button#feedback-btn.
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);