if (h == (ch + 'px')) {
return;
}
- if (desth == ch && ch>0) {
+ if (desth == ch && ch > 0) {
obj.style.height = ch + 'px';
}
setTimeout(_resizeIframe, 100, obj, ch);
$('body').on('click','[data-role="insert-formatting"]', function(e) {
e.preventDefault();
var o = $(this);
- var bbcode = o.data('bbcode');
+ var bbcode = o.data('bbcode');
var id = o.data('id');
- if (bbcode=="img") {
+ if (bbcode == "img") {
Dialog.doImageBrowser("comment", id);
return;
}
$(".onoff input").each(function() {
val = $(this).val();
id = $(this).attr("id");
- $("#"+id+"_onoff ."+ (val==0?"on":"off")).addClass("hidden");
+ $("#"+id+"_onoff ." + (val == 0 ? "on":"off")).addClass("hidden");
});
$(".onoff > a").click(function(event) {
var input = $(this).siblings("input");
var val = 1-input.val();
var id = input.attr("id");
- $("#"+id+"_onoff ."+ (val==0?"on":"off")).addClass("hidden");
- $("#"+id+"_onoff ."+ (val==1?"on":"off")).removeClass("hidden");
+ $("#"+id+"_onoff ." + (val == 0 ? "on":"off")).addClass("hidden");
+ $("#"+id+"_onoff ." + (val == 1 ? "on":"off")).removeClass("hidden");
input.val(val);
});
if (isSelected) {
return false;
}
- menu = $( $(this).attr('rel') );
+ menu = $($(this).attr('rel'));
e.preventDefault();
e.stopPropagation();
if (menu.attr('popup') == "false") {
/* notifications template */
var notifications_tpl= unescape($("#nav-notifications-template[rel=template]").html());
- var notifications_all = unescape($('<div>').append( $("#nav-notifications-see-all").clone() ).html()); //outerHtml hack
- var notifications_mark = unescape($('<div>').append( $("#nav-notifications-mark-all").clone() ).html()); //outerHtml hack
+ var notifications_all = unescape($('<div>').append($("#nav-notifications-see-all").clone()).html()); //outerHtml hack
+ var notifications_mark = unescape($('<div>').append($("#nav-notifications-mark-all").clone()).html()); //outerHtml hack
var notifications_empty = unescape($("#nav-notifications-menu").html());
/* enable perfect-scrollbars for different elements */
var notification = new Notification(document.title, {
body: decodeHtml(e.message.replace('→ ', '').format(e.name)),
icon: e.photo,
- });
+ });
notification['url'] = e.href;
notification.addEventListener("click", function(ev) {
window.location = ev.target.url;
comparison = top < scrollTop - 1;
}
if (comparison) {
- $('html, body').animate({ scrollTop: top }, 200);
+ $('html, body').animate({scrollTop: top}, 200);
return false;
}
});
}
function liveUpdate(src) {
- if ((src == null) || (stopped) || (! profile_uid)) {
+ if ((src == null) || stopped || !profile_uid) {
$('.like-rotator').hide(); return;
}
- if (($('.comment-edit-text-full').length) || (in_progress)) {
+ if (($('.comment-edit-text-full').length) || in_progress) {
if (livetime) {
clearTimeout(livetime);
}
function dolike(ident,verb) {
unpause();
$('#like-rotator-' + ident.toString()).show();
- $.get('like/' + ident.toString() + '?verb=' + verb, NavUpdate );
+ $.get('like/' + ident.toString() + '?verb=' + verb, NavUpdate);
liking = 1;
force_update = true;
update_item = ident.toString();
function dosubthread(ident) {
unpause();
$('#like-rotator-' + ident.toString()).show();
- $.get('subthread/' + ident.toString(), NavUpdate );
+ $.get('subthread/' + ident.toString(), NavUpdate);
liking = 1;
}
lockvisible = true;
$.get('lockview/' + id, function(data) {
$('#panel').html(data);
- $('#panel').css({ 'left': cursor.x + 5 , 'top': cursor.y + 5});
+ $('#panel').css({'left': cursor.x + 5 , 'top': cursor.y + 5});
$('#panel').show();
});
}
function(data) {
if (data.preview) {
$("#comment-edit-preview-" + id).html(data.preview);
- $("#comment-edit-preview-" + id + " a").click(function() { return false; });
+ $("#comment-edit-preview-" + id + " a").click(function() {return false;});
}
},
"json"
function(data) {
if (data.preview) {
$("#jot-preview-content").html(data.preview);
- $("#jot-preview-content" + " a").click(function() { return false; });
+ $("#jot-preview-content" + " a").click(function() {return false;});
}
},
"json"
}
function bin2hex(s) {
- // Converts the binary representation of data to hex
- //
- // version: 812.316
- // discuss at: http://phpjs.org/functions/bin2hex
- // + original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
- // + bugfixed by: Onno Marsman
- // + bugfixed by: Linuxworld
- // * example 1: bin2hex('Kev');
- // * returns 1: '4b6576'
- // * example 2: bin2hex(String.fromCharCode(0x00));
- // * returns 2: '00'
- var v,i, f = 0, a = [];
- s += '';
- f = s.length;
-
- for (i = 0; i<f; i++) {
- a[i] = s.charCodeAt(i).toString(16).replace(/^([\da-f])$/,"0$1");
- }
-
- return a.join('');
+ // Converts the binary representation of data to hex
+ //
+ // version: 812.316
+ // discuss at: http://phpjs.org/functions/bin2hex
+ // + original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
+ // + bugfixed by: Onno Marsman
+ // + bugfixed by: Linuxworld
+ // * example 1: bin2hex('Kev');
+ // * returns 1: '4b6576'
+ // * example 2: bin2hex(String.fromCharCode(0x00));
+ // * returns 2: '00'
+ var v,i, f = 0, a = [];
+ s += '';
+ f = s.length;
+
+ for (i = 0; i<f; i++) {
+ a[i] = s.charCodeAt(i).toString(16).replace(/^([\da-f])$/,"0$1");
+ }
+
+ return a.join('');
}
function groupChangeMember(gid, cid, sec_token) {