mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
correct live reload code
This commit is contained in:
parent
5b844f5320
commit
f6f50ffc72
@ -15,10 +15,9 @@ export default {
|
||||
if (!$(self).data('orig')) {
|
||||
$(self).data('orig', self.href);
|
||||
}
|
||||
var orig = $(self).data('orig'),
|
||||
sp = orig.split(".css?");
|
||||
var orig = $(self).data('orig');
|
||||
|
||||
self.href = sp[0] + ".css?" + data;
|
||||
self.href = orig.replace(/v=.*/, "v=" + data);
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -35,6 +35,7 @@ class SiteCustomization < ActiveRecord::Base
|
||||
remove_from_cache!
|
||||
if stylesheet_changed? || mobile_stylesheet_changed?
|
||||
MessageBus.publish "/file-change/#{key}", SecureRandom.hex
|
||||
MessageBus.publish "/file-change/#{SiteCustomization::ENABLED_KEY}", SecureRandom.hex
|
||||
end
|
||||
MessageBus.publish "/header-change/#{key}", header if header_changed?
|
||||
MessageBus.publish "/footer-change/#{key}", footer if footer_changed?
|
||||
|
Loading…
Reference in New Issue
Block a user