aboutsummaryrefslogtreecommitdiffstats
path: root/view/js
diff options
context:
space:
mode:
Diffstat (limited to 'view/js')
-rw-r--r--view/js/autocomplete.js2
-rw-r--r--view/js/main.js9
-rw-r--r--view/js/mod_help.js18
-rw-r--r--[-rwxr-xr-x]view/js/sse_worker.js0
4 files changed, 15 insertions, 14 deletions
diff --git a/view/js/autocomplete.js b/view/js/autocomplete.js
index 92db42f6d..c45c47518 100644
--- a/view/js/autocomplete.js
+++ b/view/js/autocomplete.js
@@ -350,7 +350,7 @@ function string2bb(element) {
return;
if(type=='bbcode') {
- var open_close_elements = ['bold', 'italic', 'underline', 'overline', 'strike', 'superscript', 'subscript', 'quote', 'code', 'open', 'spoiler', 'summary', 'map', 'nobb', 'list', 'checklist', 'question', 'answer', 'ul', 'ol', 'dl', 'li', 'table', 'tr', 'th', 'td', 'center', 'color', 'font', 'size', 'zrl', 'zmg', 'rpost', 'qr', 'observer', 'observer.language','embed', 'highlight', 'url', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
+ var open_close_elements = ['bold', 'italic', 'underline', 'overline', 'strike', 'superscript', 'subscript', 'quote', 'code', 'open', 'spoiler', 'map', 'nobb', 'list', 'checklist', 'question', 'answer', 'ul', 'ol', 'dl', 'li', 'table', 'tr', 'th', 'td', 'center', 'color', 'font', 'size', 'zrl', 'zmg', 'rpost', 'qr', 'observer', 'observer.language','embed', 'highlight', 'url', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
var open_elements = ['observer.baseurl', 'observer.address', 'observer.photo', 'observer.name', 'observer.webname', 'observer.url', '*', 'hr' ];
var elements = open_close_elements.concat(open_elements);
diff --git a/view/js/main.js b/view/js/main.js
index 3e3fd057c..0c48c8b18 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -1152,7 +1152,10 @@ function dolike(ident, verb) {
if(typeof conv_mode == typeof undefined)
conv_mode = '';
- $.get('like/' + ident.toString() + '?verb=' + verb + '&conv_mode=' + conv_mode, function (data) {
+ if(typeof page_mode == typeof undefined)
+ page_mode = '';
+
+ $.get('like/' + ident.toString() + '?verb=' + verb + '&conv_mode=' + conv_mode + '&page_mode=' + page_mode, function (data) {
if(data.success) {
// this is a bit tricky since the top level thread wrapper wraps the whole thread
if($('#thread-wrapper-' + data.orig_id).hasClass('toplevel_item')) {
@@ -1560,7 +1563,7 @@ function zFormError(elm,x) {
$(window).scroll(function () {
if(typeof buildCmd == 'function') {
// This is a content page with items and/or conversations
- if($(window).scrollTop() + $(window).height() > $(document).height() - 500) {
+ if($(window).scrollTop() + $(window).height() > $('#conversation-end').position().top) {
if((pageHasMoreContent) && (! loadingPage)) {
next_page++;
scroll_next = true;
@@ -1571,7 +1574,7 @@ $(window).scroll(function () {
}
else {
// This is some other kind of page - perhaps a directory
- if($(window).scrollTop() + $(window).height() > $(document).height() - 500) {
+ if($(window).scrollTop() + $(window).height() > $('#page-end').position().top) {
if((pageHasMoreContent) && (! loadingPage) && (! justifiedGalleryActive)) {
next_page++;
scroll_next = true;
diff --git a/view/js/mod_help.js b/view/js/mod_help.js
index 107845c04..9c3591498 100644
--- a/view/js/mod_help.js
+++ b/view/js/mod_help.js
@@ -14,7 +14,7 @@ toc = {};
$(document).ready(function () {
// Generate the table of contents in the side nav menu (see view/tpl/help.tpl)
$('#doco-top-toc').toc({content: "#doco-content", headings: "h3,h4,h5,h6"});
-
+
$(".doco-section").find('a').each(function () {
var url = document.createElement('a');
url.href = window.location;
@@ -31,8 +31,6 @@ $(document).ready(function () {
}
});
- $(document.body).trigger("sticky_kit:recalc");
-
toc.contentTop = [];
toc.edgeMargin = 20; // margin above the top or margin from the end of the page
toc.topRange = 200; // measure from the top of the viewport to X pixels down
@@ -72,7 +70,7 @@ $(document).ready(function () {
location.replace(newref)
}
-
+
// Determine language translations available from the language selector menu itself
var langChoices = [];
$('.lang-selector').find('.lang-choice').each(function (idx, a) {
@@ -89,7 +87,7 @@ $(document).ready(function () {
pathParts.push(help_language);
pick_me = false;
if($.inArray(path[i], langChoices) < 0) {
- i--;
+ i--;
}
}
} else {
@@ -97,20 +95,20 @@ $(document).ready(function () {
pathParts.push(path[i]);
}
}
-
+
}
// Update the address bar to reflect the loaded language
window.history.replaceState({}, '', '/' + pathParts.join('/'));
-
+
// Highlight the language in the language selector that is currently viewed
$('.lang-selector').find('.lang-choice:contains("' + help_language + '")').addClass('active');
-
+
// Construct the links to the available translations based and populate the selector menu
$('.lang-selector').find('.lang-choice').each(function (idx, a) {
var langLink = [];
for (var i = 0; i < pathParts.length; i++) {
-
+
if(i === 1) {
langLink.push($(a).html());
} else {
@@ -120,5 +118,5 @@ $(document).ready(function () {
}
$(a).attr('href', '/' + langLink.join('/'));
});
-
+
});
diff --git a/view/js/sse_worker.js b/view/js/sse_worker.js
index 78e4aa51b..78e4aa51b 100755..100644
--- a/view/js/sse_worker.js
+++ b/view/js/sse_worker.js