Change view to hide, omitted to expanded, and x Loading... to ... on .summary click.

This commit is contained in:
Jordan Bates 2013-05-17 04:03:57 -07:00
parent 868862ede1
commit 41a135f1c2
4 changed files with 16 additions and 16 deletions

View File

@ -8389,7 +8389,7 @@
return; return;
} }
thread.isExpanded = 'loading'; thread.isExpanded = 'loading';
a.textContent = a.textContent.replace('+', '× Loading...'); a.textContent = a.textContent.replace('+', '...');
$.cache("//api.4chan.org/" + thread.board + "/res/" + thread + ".json", function() { $.cache("//api.4chan.org/" + thread.board + "/res/" + thread + ".json", function() {
return ExpandThread.parse(this, thread, a); return ExpandThread.parse(this, thread, a);
}); });
@ -8399,12 +8399,12 @@
if (!a) { if (!a) {
return; return;
} }
a.textContent = a.textContent.replace('× Loading...', '+'); a.textContent = a.textContent.replace('...', '+');
break; break;
case true: case true:
thread.isExpanded = false; thread.isExpanded = false;
if (a) { if (a) {
a.textContent = a.textContent.replace('-', '+'); a.textContent = a.textContent.replace('-', '+').replace('hide', 'view').replace('expanded', 'omitted');
num = (function() { num = (function() {
if (thread.isSticky) { if (thread.isSticky) {
return 1; return 1;
@ -8452,7 +8452,7 @@
return; return;
} }
thread.isExpanded = true; thread.isExpanded = true;
a.textContent = a.textContent.replace('× Loading...', '-'); a.textContent = a.textContent.replace('...', '-').replace('view', 'hide').replace('omitted', 'expanded');
posts = JSON.parse(req.response).posts; posts = JSON.parse(req.response).posts;
if (spoilerRange = posts[0].custom_spoiler) { if (spoilerRange = posts[0].custom_spoiler) {
Build.spoilerRange[g.BOARD] = spoilerRange; Build.spoilerRange[g.BOARD] = spoilerRange;

View File

@ -8398,7 +8398,7 @@
return; return;
} }
thread.isExpanded = 'loading'; thread.isExpanded = 'loading';
a.textContent = a.textContent.replace('+', '× Loading...'); a.textContent = a.textContent.replace('+', '...');
$.cache("//api.4chan.org/" + thread.board + "/res/" + thread + ".json", function() { $.cache("//api.4chan.org/" + thread.board + "/res/" + thread + ".json", function() {
return ExpandThread.parse(this, thread, a); return ExpandThread.parse(this, thread, a);
}); });
@ -8408,12 +8408,12 @@
if (!a) { if (!a) {
return; return;
} }
a.textContent = a.textContent.replace('× Loading...', '+'); a.textContent = a.textContent.replace('...', '+');
break; break;
case true: case true:
thread.isExpanded = false; thread.isExpanded = false;
if (a) { if (a) {
a.textContent = a.textContent.replace('-', '+'); a.textContent = a.textContent.replace('-', '+').replace('hide', 'view').replace('expanded', 'omitted');
num = (function() { num = (function() {
if (thread.isSticky) { if (thread.isSticky) {
return 1; return 1;
@ -8461,7 +8461,7 @@
return; return;
} }
thread.isExpanded = true; thread.isExpanded = true;
a.textContent = a.textContent.replace('× Loading...', '-'); a.textContent = a.textContent.replace('...', '-').replace('view', 'hide').replace('omitted', 'expanded');
posts = JSON.parse(req.response).posts; posts = JSON.parse(req.response).posts;
if (spoilerRange = posts[0].custom_spoiler) { if (spoilerRange = posts[0].custom_spoiler) {
Build.spoilerRange[g.BOARD] = spoilerRange; Build.spoilerRange[g.BOARD] = spoilerRange;

View File

@ -8381,7 +8381,7 @@
return; return;
} }
thread.isExpanded = 'loading'; thread.isExpanded = 'loading';
a.textContent = a.textContent.replace('+', '× Loading...'); a.textContent = a.textContent.replace('+', '...');
$.cache("//api.4chan.org/" + thread.board + "/res/" + thread + ".json", function() { $.cache("//api.4chan.org/" + thread.board + "/res/" + thread + ".json", function() {
return ExpandThread.parse(this, thread, a); return ExpandThread.parse(this, thread, a);
}); });
@ -8391,12 +8391,12 @@
if (!a) { if (!a) {
return; return;
} }
a.textContent = a.textContent.replace('× Loading...', '+'); a.textContent = a.textContent.replace('...', '+');
break; break;
case true: case true:
thread.isExpanded = false; thread.isExpanded = false;
if (a) { if (a) {
a.textContent = a.textContent.replace('-', '+'); a.textContent = a.textContent.replace('-', '+').replace('hide', 'view').replace('expanded', 'omitted');
num = (function() { num = (function() {
if (thread.isSticky) { if (thread.isSticky) {
return 1; return 1;
@ -8444,7 +8444,7 @@
return; return;
} }
thread.isExpanded = true; thread.isExpanded = true;
a.textContent = a.textContent.replace('× Loading...', '-'); a.textContent = a.textContent.replace('...', '-').replace('view', 'hide').replace('omitted', 'expanded');
posts = JSON.parse(req.response).posts; posts = JSON.parse(req.response).posts;
if (spoilerRange = posts[0].custom_spoiler) { if (spoilerRange = posts[0].custom_spoiler) {
Build.spoilerRange[g.BOARD] = spoilerRange; Build.spoilerRange[g.BOARD] = spoilerRange;

View File

@ -31,19 +31,19 @@ ExpandThread =
thread.isExpanded = true thread.isExpanded = true
return return
thread.isExpanded = 'loading' thread.isExpanded = 'loading'
a.textContent = a.textContent.replace '+', '× Loading...' a.textContent = a.textContent.replace '+', '...'
$.cache "//api.4chan.org/#{thread.board}/res/#{thread}.json", -> $.cache "//api.4chan.org/#{thread.board}/res/#{thread}.json", ->
ExpandThread.parse @, thread, a ExpandThread.parse @, thread, a
when 'loading' when 'loading'
thread.isExpanded = false thread.isExpanded = false
return unless a return unless a
a.textContent = a.textContent.replace '× Loading...', '+' a.textContent = a.textContent.replace '...', '+'
when true when true
thread.isExpanded = false thread.isExpanded = false
if a if a
a.textContent = a.textContent.replace '-', '+' a.textContent = a.textContent.replace('-', '+').replace('hide', 'view').replace('expanded', 'omitted')
#goddamit moot #goddamit moot
num = if thread.isSticky num = if thread.isSticky
1 1
@ -71,7 +71,7 @@ ExpandThread =
return return
thread.isExpanded = true thread.isExpanded = true
a.textContent = a.textContent.replace '× Loading...', '-' a.textContent = a.textContent.replace('...', '-').replace('view', 'hide').replace('omitted', 'expanded')
posts = JSON.parse(req.response).posts posts = JSON.parse(req.response).posts
if spoilerRange = posts[0].custom_spoiler if spoilerRange = posts[0].custom_spoiler