{:uriI"›file://app/assets/javascripts/application.js?type=application/javascript&pipeline=debug&id=42c7636979d1141c7e550d126db31d89f7e84e9da31f751ed58f61d2b435a4bc:ET:load_pathI"app/assets/javascripts;T: filenameI"*app/assets/javascripts/application.js;T: nameI"application;T:logical_pathI"application.debug.js;T:content_typeI"application/javascript;T: sourceI"k(function(window){ 'use strict'; function defineLibrary(){ var JobNotifier = {}; JobNotifier.init = function() { var body = document.querySelector('body'); JobNotifier.jobIdentifier = body.dataset.identifier; JobNotifier.rootUrl = body.dataset.rootUrl; console.info(JobNotifier.rootUrl); setInterval(JobNotifier.poll, 5000); }; JobNotifier.poll = function() { var oReq = new XMLHttpRequest(); oReq.onload = JobNotifier.reqListener; oReq.onerror = JobNotifier.onError; oReq.open('get', '/job_notifier/jobs.json?identifier=' + JobNotifier.jobIdentifier, true); oReq.send(); }; JobNotifier.reqListener = function() { var data = JSON.parse(this.responseText); if(data.length > 0) { JobNotifier.onNotify(data); } }; JobNotifier.onNotify = function(data) { console.info('Override this method with your own logic. Data: ', data); }; JobNotifier.onError = function(err) { console.error('Error', err); }; return JobNotifier; } if(typeof(JobNotifier) === 'undefined'){ window.JobNotifier = defineLibrary(); } else{ console.log('JobNotifier already defined.'); } })(window); document.addEventListener('DOMContentLoaded', JobNotifier.init); JobNotifier.onNotify = function(data) { console.info('On notify', data); }; ;T: metadata{ :dependencieso:Set: @hash{I"environment-version;TTI"environment-paths;TTI"rails-env;TTI"[processors:type=application/javascript&file_type=application/javascript&pipeline=debug;TTI"8file-digest://app/assets/javascripts/application.js;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI"bfile-digest:///Users/leandro/src/job_notifier/app/assets/javascripts/job_notifier/notifier.js;TTI")file-digest://app/assets/javascripts;TTI"1file-digest://app/assets/images/job_notifier;TTI":file-digest://app/assets/images/job_notifier/notifier;TTI"6file-digest://app/assets/javascripts/job_notifier;TTI"?file-digest://app/assets/javascripts/job_notifier/notifier;TTI"6file-digest://app/assets/stylesheets/job_notifier;TTI"?file-digest://app/assets/stylesheets/job_notifier/notifier;TTI"Qfile-digest:///Users/leandro/src/job_notifier/app/assets/images/job_notifier;TTI"Zfile-digest:///Users/leandro/src/job_notifier/app/assets/images/job_notifier/notifier;TTI"Vfile-digest:///Users/leandro/src/job_notifier/app/assets/javascripts/job_notifier;TTI"_file-digest:///Users/leandro/src/job_notifier/app/assets/javascripts/job_notifier/notifier;TT: linkso;;{: included[I"Äfile:///Users/leandro/src/job_notifier/app/assets/javascripts/job_notifier/notifier.js?type=application/javascript&pipeline=self&id=727593cb71f54b4fad5b70b032638d671d49de2a03f10b8bd7ae2dbdddb9a332;TI"šfile://app/assets/javascripts/application.js?type=application/javascript&pipeline=self&id=861aa8cb1b94caa7e8b81f1c174a5224004df3603405b58659b47404948bdacf;T: charsetI" utf-8;F: digest"%r`EY}óêAûù4!‘‡@ªÖ¥8¦mNíEÔIâv: lengthik:dependencies_digest"%PrkhmƒŠMkc ˜‹§>íÓÏUµlÝ÷:idI"E42c7636979d1141c7e550d126db31d89f7e84e9da31f751ed58f61d2b435a4bc;F: mtimel+ïBW