Skip to content
Browse files

deginning parent check

  • Loading branch information...
1 parent 5c2d33a commit 4572c5c241c9bca705c9ff912801f7812745d0dd @christopherdebeer committed Dec 29, 2011
Showing with 21 additions and 1 deletion.
  1. +7 −0 hnCommentWatcher.css
  2. +14 −1 hnCommentWatcher.js
View
7 hnCommentWatcher.css
@@ -15,4 +15,11 @@
border-radius: 15px 15px 15px 15px !important;
color: #FFFFFF !important;
padding: 5px 10px !important;
+}
+#hnCW .loading {
+ position: absolute;
+ width: 100%;
+ height: 100%;
+ z-index: 999999;
+ background-color: #000;
}
View
15 hnCommentWatcher.js
@@ -19,7 +19,15 @@ var hnCW = {
border-radius: 15px 15px 15px 15px !important; \
color: #FFFFFF !important; \
padding: 5px 10px !important; \
- }",
+ } \
+ #hnCW .loading { \
+ position: absolute; \
+ width: 100%; \
+ height: 100%; \
+ z-index: 999999; \
+ background-color: #000; \
+ } \
+ ",
nextButton: $("<p><a class='nextNew' href='#'>Next</a>"),
@@ -89,13 +97,16 @@ var hnCW = {
_this = this;
_this.newComments = [];
+
+ $("body").append("<div class='loading' />");
var thisUrl = document.location.href;
$.get(thisUrl, function (data) {
// update the page
$("body").html(data);
$("body").attr("id","hnCW");
+ $("body").append("<div class='loading' />");
_this.reapplyCSS();
// check whats new
@@ -143,6 +154,8 @@ var hnCW = {
// _this.comments[thisComment.hash] = thisComment;
}
+ $("#hnCW .loading").remove();
+
});

0 comments on commit 4572c5c

Please sign in to comment.
Something went wrong with that request. Please try again.