!function(e){var n;function t(e){n&&console&&console.log("setOptionSelected:inId="+e);var t=document.getElementById(e);t&&(t.selected="selected")}function o(){if(foswiki.Pref.getPref("WebChangesForAllWebs_dateLastCheck")){var o=e('input[name="sinceReadable"]').val();n&&console&&console.log("sinceReadable selectedOption:"+o),t(o||"24_hours_ago")}var s,c,a=new Date,i=a.getFullYear()+"-"+(a.getMonth()+1)+"-"+a.getDate()+" "+a.getHours()+":"+a.getMinutes()+":"+a.getSeconds();i=i.replace(/([-: ])(\d)([-: ]|$)/g,"$10$2$3"),n&&console&&console.log("now:"+i),i&&(foswiki.Pref.setPref(foswiki.getPreference("WEB")+"_"+foswiki.getPreference("TOPIC")+"_dateLastCheck",i),s=i,(c=document.getElementById("last_time_checked"))&&(c.value=s,c.text="last time I checked"))}function s(){var e;document.forms.seeChangesSince.web.value=document.forms.seeChangesSince.web.value.replace(/\s*,\s*/,", "),e=document.forms.seeChangesSince.since.value,n&&console&&console.log("submitted:"+e),document.forms.seeChangesSince.submit()}e((function(){n=e("input[name='debugJs']").val(),e("#siteChangesSelect").change((function(){var t,o,c,a=e("option:selected",this);t=a.attr("id"),o=a.attr("value"),c=document.forms.seeChangesSince.sinceReadable,n&&console&&console.log("storeSelectedOption:inName="+t+";inValue="+o+";inStorageField="+c),c.value=t,s()})),e(document.forms.seeChangesSince).submit((function(){s()})),o()}))}(jQuery);
