Open Neil-Swanson opened 2 years ago
Two uses:
www
apps
This could use this trick Google Surveys -- a way to pass URL parameters into survey? - Stack Overflow to obtain url, eg:
entry.
<script>
// replace __js-replace_by_bug-url__.html in menu with
document.getElementById("demo").innerHTML =
"Page location is " + window.location.href;
!expr paste0('https://docs.google.com/forms/d/e/1FAIpQLSfOKbx4Y_hNUjSj8gfuTuzvTFTIaBDJCojDoNThvkZImc6ZsA/viewform?entry.738205286=https://www.marineenergy.app/', fs::path_ext_set(knitr::current_input(), '.html'))
// http://www.javascripter.net/faq/searchin.htm
</script>
Thanks to @geocoug, got this to work with some JQuery JavaScript per commit https://github.com/marineenergy/www/commit/80c31952c1c482beb2b64cbc25c4e33ab57fb0c4: implemented menu 'Report a Bug' for regs-state #32 but commented out until later able to implement in footer for all pages
:
<script>
// replace __js-replace_by_bug-url__.html in menu with
$("a:contains('Report a Bug')").attr("href", "`r paste0('https://docs.google.com/forms/d/e/1FAIpQLSfOKbx4Y_hNUjSj8gfuTuzvTFTIaBDJCojDoNThvkZImc6ZsA/viewform?entry.738205286=https://www.marineenergy.app/', fs::path_ext_set(knitr::current_input(), '.html'))`");
</script>
Example:
Created draft questions on Google Drive for review; received feedback from everyone and generated a Google Form for testing.
Draft form: Marine Energy Toolkit Feedback Form
Responses: Linked Responses Google Sheet
@geocoug , @bbest , @cdobbelaere - please test the feedback form and let me know if you have any suggestions.