You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
465 B
24 lines
465 B
var ReloaderBase = new Class({
|
|
|
|
initialize: function(){
|
|
var self = this;
|
|
|
|
App.on('watcher.changed', self.reloadFile.bind(self));
|
|
|
|
},
|
|
|
|
reloadFile: function(data){
|
|
var self = this,
|
|
urls = data.data;
|
|
|
|
urls.each(function(url){
|
|
var without_timestamp = url.split('?')[0],
|
|
old_links = document.getElement('[data-url^=\''+without_timestamp+'\']');
|
|
|
|
old_links.set('href', old_links.get('href') + 1);
|
|
});
|
|
}
|
|
|
|
});
|
|
|
|
var Reloader = new ReloaderBase();
|
|
|