summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSavetheinternet <savetheinternet@tinyboard.org>2011-07-30 21:28:52 +1000
committerSavetheinternet <savetheinternet@tinyboard.org>2011-07-30 21:28:52 +1000
commitc51c59c20ce2d2182648114e024e78c2c57c1333 (patch)
tree047f12f41573338edce7907ec36da9ec856e4c7a
parent65ad6bf0637e091e4899f024e344b4997453b94e (diff)
don't wait for entire page to load before citing reply
-rw-r--r--main.js9
-rw-r--r--templates/main.js9
2 files changed, 10 insertions, 8 deletions
diff --git a/main.js b/main.js
index ce640390..e0d0d6f4 100644
--- a/main.js
+++ b/main.js
@@ -103,7 +103,10 @@ function rememberStuff() {
document.forms.post.name.value = localStorage.name;
if(localStorage.email)
document.forms.post.email.value = localStorage.email;
-
+
+ if (window.location.hash.indexOf('q') == 1)
+ citeReply(window.location.hash.substring(2));
+
if(sessionStorage.body) {
saved = JSON.parse(sessionStorage.body);
if(get_cookie('serv')) {
@@ -180,9 +183,7 @@ function init()
document.forms.postcontrols.password.value = localStorage.password;
}
- if (window.location.hash.indexOf('q') == 1)
- citeReply(window.location.hash.substring(2));
- else if (window.location.hash.substring(1))
+ if(window.location.hash.indexOf('q') != 1 && window.location.hash.substring(1))
highlightReply(window.location.hash.substring(1));
init_expanding();
diff --git a/templates/main.js b/templates/main.js
index 89f98ccd..4476e2ff 100644
--- a/templates/main.js
+++ b/templates/main.js
@@ -103,7 +103,10 @@ function rememberStuff() {
document.forms.post.name.value = localStorage.name;
if(localStorage.email)
document.forms.post.email.value = localStorage.email;
-
+
+ if (window.location.hash.indexOf('q') == 1)
+ citeReply(window.location.hash.substring(2));
+
if(sessionStorage.body) {
saved = JSON.parse(sessionStorage.body);
if(get_cookie('{config[cookies][js]}')) {
@@ -180,9 +183,7 @@ function init()
document.forms.postcontrols.password.value = localStorage.password;
}
- if (window.location.hash.indexOf('q') == 1)
- citeReply(window.location.hash.substring(2));
- else if (window.location.hash.substring(1))
+ if(window.location.hash.indexOf('q') != 1 && window.location.hash.substring(1))
highlightReply(window.location.hash.substring(1));
{config[inline_expanding]?init_expanding();}