mirror of
https://github.com/discourse/discourse.git
synced 2025-03-23 05:07:47 +08:00
Update embed.html.erb
Add state descriptor to message being sent to parent window
This commit is contained in:
parent
f0fc38418c
commit
2244f19ff9
@ -38,8 +38,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
window.onload = function() {
|
window.onload = function() {
|
||||||
// Send a post message with our loaded height
|
var state = "loading";
|
||||||
postUp({type: 'discourse-resize', height: document['body'].offsetHeight});
|
if (document.querySelectorAll("a.replies").length > 0) {
|
||||||
|
var state = "loaded";
|
||||||
|
}
|
||||||
|
// Send a post message with our loaded height and state
|
||||||
|
postUp({type: 'discourse-resize', height: document['body'].offsetHeight, state: state});
|
||||||
|
|
||||||
var postLinks = document.querySelectorAll("a[data-link-to-post]"),
|
var postLinks = document.querySelectorAll("a[data-link-to-post]"),
|
||||||
i;
|
i;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user