date-picker.js
1 year ago
duplicate-field.js
1 year ago
email-reports.js
2 months ago
module-markup.js
3 months ago
notices.js
1 year ago
overview.js
9 months ago
scroll-to-top.js
2 years ago
sticky-sidebar.js
2 years ago
support.js
3 months ago
user-roles.js
1 year ago
support.js
22 lines
| 1 | const $ = jQuery; |
| 2 | |
| 3 | const Support = { |
| 4 | setup() { |
| 5 | if ($('body').hasClass('analytics_page_independent-analytics-support-center')) { |
| 6 | |
| 7 | const form = document.getElementById('search-form') |
| 8 | const searchField = document.getElementById('search-field'); |
| 9 | |
| 10 | form.onsubmit = function(e) { |
| 11 | e.preventDefault(); |
| 12 | if (searchField.value == '') { |
| 13 | window.open('https://independentwp.com/knowledgebase/'); |
| 14 | } else { |
| 15 | window.open('https://independentwp.com/?post_type=kb_article&s=' + searchField.value); |
| 16 | } |
| 17 | } |
| 18 | } |
| 19 | } |
| 20 | } |
| 21 | |
| 22 | export { Support }; |