Skip to content

Commit

Permalink
Unnötigen document-ready code entfernen (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
staabm authored and tbaddade committed Oct 28, 2018
1 parent 0caf0dc commit ec61636
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions assets/watson.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,11 @@ jQuery(function($){
|
*/

$(document).ready( function() {

var $watson_id = getUrlParameter('watson_id');
var $watson_text = getUrlParameter('watson_text');
if ($watson_id && $watson_text) {
$('#' + $watson_id).val($watson_text).focus();
}
});
var $watson_id = getUrlParameter('watson_id');
var $watson_text = getUrlParameter('watson_text');
if ($watson_id && $watson_text) {
$('#' + $watson_id).val($watson_text).focus();
}

function getUrlParameter(name) {
return decodeURI(
Expand Down Expand Up @@ -95,10 +92,8 @@ jQuery(function($){
var $watsonTypeahead = $('#watson-agent .typeahead');
var $watsonOverlay = $('#watson-overlay');

$(document).ready( function() {
$watsonOverlay.click(function(){
hideWatsonAgent();
});
$watsonOverlay.click(function(){
hideWatsonAgent();
});

// support buttons created dynamically
Expand Down

0 comments on commit ec61636

Please sign in to comment.