{:uriI"file://app/assets/javascripts/application.js?type=application/javascript&pipeline=debug&id=c926266f9b2ef3dc8d9f848e842467fe6d4d50e5b80d22301906314496f52ea7: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"JobNotifier = JobNotifier || {}; (function(o){ o.init = function() { var body = document.querySelector("body"); o.jobIdentifier = body.dataset.identifier; setInterval(o.poll, 5000); }; o.poll = function() { var oReq = new XMLHttpRequest(); oReq.onload = o.reqListener; oReq.onerror = o.onError; oReq.open('get', '/job_notifier/jobs.json?identifier=' + o.jobIdentifier, true); oReq.send(); }; o.reqListener = function() { var data = JSON.parse(this.responseText); o.onNotify(data); }; o.onNotify = function(data) { console.info('Override this method with your own logic. Data: ', data); }; o.onError = function(err) { console.error('Error', err); }; })(JobNotifier); console.log(JobNotifier); document.addEventListener("DOMContentLoaded", JobNotifier.init); JobNofifier.onNotify = function(mensaje) { console.log('bla', mensaje); }; ;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=7462a09956bdeb4983ee1ebe51a82747cad266921bc6f3b0a2b7f5e24d9d3b00;TI"file://app/assets/javascripts/application.js?type=application/javascript&pipeline=self&id=eb881c5f7fecc889f9a2d940711cd11ca3b3afb1830f32ee641f68173953b8c6;T: charsetI" utf-8;F: digest"%fH$,0X㶧Q~^kWu: lengthi:dependencies_digest"%7ڽS,[b}ӛݗ761S<:idI"Ec926266f9b2ef3dc8d9f848e842467fe6d4d50e5b80d22301906314496f52ea7;F: mtimel+)1W