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